@uipath/case-tool 1.201.0 → 1.202.0-preview.136

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 (96) hide show
  1. package/dist/{authoring-aaaqwck3.js → authoring-cvjhkfxp.js} +74 -48
  2. package/dist/{browser-strategy-rkcvc6tn.js → browser-strategy-6atc7v8s.js} +3 -3
  3. package/dist/case-api-bwcxsbxe.js +381 -0
  4. package/dist/case-debug-studio-web-service-qcb328bt.js +335 -0
  5. package/dist/{case-pack-service-bxas5bxz.js → case-pack-service-txby2znw.js} +11 -18
  6. package/dist/case-validate-service-0q8krj2a.js +2114 -0
  7. package/dist/connector-enrichment-service-agqxam5y.js +60 -0
  8. package/dist/connector-lookup-service-ycgk77n0.js +22 -0
  9. package/dist/connector-task-spec-kdx5bv87.js +1250 -0
  10. package/dist/{de-5KVP66U6-t37qr521.js → de-5KVP66U6-1bnf4zt5.js} +54 -54
  11. package/dist/{de-5HU6GFWV-zheyw6d2.js → de-7XQXX2DK-tqdy5n2b.js} +857 -845
  12. package/dist/debug-service-dxx5pfev.js +57 -0
  13. package/dist/{en-MABQK6C4-nkzq2j8t.js → en-5ZGC5VQ3-h581y30k.js} +897 -897
  14. package/dist/{en-4KXU7N7B-24v330b5.js → en-X3S6IZ5J-nhkg6pwn.js} +55 -61
  15. package/dist/enrichment-service-ebz1f4ds.js +421 -0
  16. package/dist/{es-MX-POESXYP2-9538722k.js → es-MX-U2VN3SZW-anynsmd8.js} +857 -845
  17. package/dist/{es-MX-XAVLOQW3-47a405kf.js → es-MX-XAVLOQW3-q00km2y7.js} +54 -54
  18. package/dist/{es-VFPNVMP5-6sftsdxe.js → es-VFPNVMP5-bx2c337j.js} +54 -54
  19. package/dist/{es-LUTYN7U7-ye5zn4sn.js → es-ZGCPPOME-8gazspjj.js} +857 -845
  20. package/dist/{fr-E5MDO4EG-f3x1jeqw.js → fr-E5MDO4EG-c3mkty2t.js} +54 -54
  21. package/dist/{fr-LJIK56LW-xf3xf2kh.js → fr-T3G5GZCT-y3f7xb1q.js} +857 -845
  22. package/dist/{index-cncq089f.js → index-7s201ka0.js} +163 -80
  23. package/dist/{index-hsadteg4.js → index-h8cph72k.js} +4 -4
  24. package/dist/index-k4xz16db.js +63712 -0
  25. package/dist/{index-p50kx6jv.js → index-k5tbd184.js} +276 -276
  26. package/dist/index-kwxe1vep.js +143 -0
  27. package/dist/{index-9f8q2ege.js → index-p3vk57z7.js} +27 -27
  28. package/dist/index-qyf1dee9.js +630 -0
  29. package/dist/index.js +16 -17
  30. package/dist/{index.umd.min-drpc57vn.js → index.umd.min-fqefd9kn.js} +3 -3
  31. package/dist/input-reader-xb9vecxv.js +11 -0
  32. package/dist/{ja-FGEGLBJ3-w9byjhze.js → ja-BI5K3JDZ-77zat4z2.js} +857 -845
  33. package/dist/{ja-DPO5PPLO-fmbg7zt2.js → ja-DPO5PPLO-mysfmznx.js} +54 -54
  34. package/dist/{js-yaml-cggj6w7q.js → js-yaml-87cdx6bm.js} +27 -19
  35. package/dist/known-types-qryebm95.js +15 -0
  36. package/dist/{ko-ITOPNIYI-aqy82jk8.js → ko-ITOPNIYI-hmxd2asd.js} +54 -54
  37. package/dist/{ko-TUAK3G3A-s25w0ckg.js → ko-JOBF5V7N-4bv0mjje.js} +857 -845
  38. package/dist/{node-strategy-8gzp67xs.js → node-strategy-0267x5e5.js} +130 -14
  39. package/dist/node-sync-service-9a9ksj9s.js +38 -0
  40. package/dist/{packager-tool-9qecd4wb.js → packager-tool-0gctz400.js} +5 -2
  41. package/dist/packager-tool-0mj06yen.js +65 -0
  42. package/dist/{packager-tool-1cb0d5e0.js → packager-tool-0v3s8r01.js} +2 -2
  43. package/dist/packager-tool-134mvmcm.js +3040 -0
  44. package/dist/{packager-tool-wckvcay0.js → packager-tool-1yh8g550.js} +9 -7
  45. package/dist/{packager-tool-zqa5k9f7.js → packager-tool-37zvccmt.js} +990 -2287
  46. package/dist/packager-tool-3ze5vt52.js +54 -0
  47. package/dist/{packager-tool-w3h8xrnv.js → packager-tool-56j6keqr.js} +71 -3
  48. package/dist/{packager-tool-3wygxefb.js → packager-tool-58q3tvh7.js} +10 -10
  49. package/dist/{packager-tool-zx48pq4v.js → packager-tool-5ax2ywcg.js} +1997 -1174
  50. package/dist/{packager-tool-we1phz71.js → packager-tool-885mmrvr.js} +31 -3
  51. package/dist/packager-tool-9scn4b15.js +852 -0
  52. package/dist/{packager-tool-p9j43p8h.js → packager-tool-a42jnpy5.js} +3 -9
  53. package/dist/packager-tool-ajvse9r3.js +356 -0
  54. package/dist/{packager-tool-jysvpt8p.js → packager-tool-c23zrhj8.js} +2 -2
  55. package/dist/packager-tool-dqs5qy9s.js +2327 -0
  56. package/dist/packager-tool-ee5dhff3.js +6717 -0
  57. package/dist/{packager-tool-wvqz81mx.js → packager-tool-gtzs471w.js} +3 -2
  58. package/dist/packager-tool-hrr0efqc.js +546 -0
  59. package/dist/packager-tool-j9rfdrdm.js +1125 -0
  60. package/dist/{packager-tool-gq6952nc.js → packager-tool-jhdf8gt1.js} +5054 -17851
  61. package/dist/packager-tool-mp59jtpm.js +6865 -0
  62. package/dist/packager-tool-njzcfve1.js +77 -0
  63. package/dist/packager-tool-p7jgrm5r.js +15 -0
  64. package/dist/packager-tool-r84ng21s.js +57 -0
  65. package/dist/packager-tool-rqvr63x5.js +1217 -0
  66. package/dist/packager-tool-s12392rd.js +80 -0
  67. package/dist/packager-tool-sv0d6wb6.js +173 -0
  68. package/dist/packager-tool-ty1t2byf.js +27 -0
  69. package/dist/packager-tool-vepqrsse.js +23 -0
  70. package/dist/packager-tool-w5ek334f.js +4892 -0
  71. package/dist/{packager-tool-5arsyj36.js → packager-tool-yc4kw997.js} +4 -2
  72. package/dist/packager-tool.js +91 -5
  73. package/dist/project-artifacts-vhanbtw5.js +14 -0
  74. package/dist/{pt-BR-7XGDXRDJ-espnkgrj.js → pt-BR-7DYX2YPT-fqxqzqtf.js} +857 -845
  75. package/dist/{pt-BR-BXURWX4W-xzyndmrx.js → pt-BR-BXURWX4W-bwfcwhk1.js} +54 -54
  76. package/dist/{pt-TMVOOITK-myha14p9.js → pt-HTXGGX6Y-97t21dty.js} +857 -845
  77. package/dist/{pt-YI4VE4YQ-521681zf.js → pt-YI4VE4YQ-wdkn2dcf.js} +54 -54
  78. package/dist/resourcesSyncService-mrmmwaqr.js +683 -0
  79. package/dist/{ro-2VALF3S5-cdz5afkr.js → ro-KTNQ3MNU-y08n1x5g.js} +857 -845
  80. package/dist/{ro-RKXZUG7Z-pdztdafr.js → ro-RKXZUG7Z-nndrrsq7.js} +54 -54
  81. package/dist/{ru-GSCT4ARZ-qj8dm4dp.js → ru-GSCT4ARZ-1sa9wbr8.js} +1 -1
  82. package/dist/ru-WBLQ5B2U-8r3c7v6d.js +10 -0
  83. package/dist/strict-case-rules-303vjvas.js +377 -0
  84. package/dist/strict-sdd-audit-qdmc9e1y.js +1024 -0
  85. package/dist/tool.js +17 -18
  86. package/dist/{tr-AA6O2WSR-bj9n80k8.js → tr-AA6O2WSR-86ba4bdf.js} +54 -54
  87. package/dist/{tr-RIFCEXFH-hgkb4g8y.js → tr-XHSSPNK7-cmqyc4wd.js} +857 -845
  88. package/dist/trigger-enrichment-service-zdx4x92j.js +340 -0
  89. package/dist/{zh-CN-IP3FMXWM-1cfarhcp.js → zh-CN-2EHQT23P-mr63c4xz.js} +857 -845
  90. package/dist/{zh-CN-R2KLHXQV-x6gnk2n0.js → zh-CN-R2KLHXQV-agqr45ds.js} +54 -54
  91. package/dist/{zh-TW-AGIDXIPF-n6r6w7vy.js → zh-TW-MGZCE5BT-c4ekmrz9.js} +857 -845
  92. package/dist/{zh-TW-RJGCQANM-tt8j5wv2.js → zh-TW-RJGCQANM-w0x3qc1p.js} +54 -54
  93. package/package.json +2 -2
  94. package/dist/index-8bsngk9y.js +0 -247140
  95. package/dist/packager-tool-axcdppp9.js +0 -13607
  96. package/dist/ru-WBLQ5B2U-8xd4gpv2.js +0 -10
@@ -1,7 +1,7 @@
1
- import"./packager-tool-jysvpt8p.js";
2
- import"./packager-tool-wckvcay0.js";
1
+ import"./packager-tool-c23zrhj8.js";
2
+ import"./packager-tool-1yh8g550.js";
3
3
 
4
- // ../../node_modules/@uipath/flow-core/node_modules/@uipath/flow-schema/dist/ro-RKXZUG7Z.js
4
+ // ../../node_modules/@uipath/flow-schema/dist/ro-RKXZUG7Z.js
5
5
  var agentDuplicateToolNames_duplicateName_message = "Numele instrumentului „{{name}}” este utilizat de mai multe instrumente pe acest agent. Fiecare instrument trebuie să aibă un nume unic.";
6
6
  var agentEmptyVar_unwrittenVariable_message = 'Agentul folosește "$vars.{{root}}", dar niciun nod nu atribuie o valoare lui "{{root}}", astfel încât va fi gol în timpul execuției. Asociați-l cu un output al unui nod (de exemplu, output-ul "<node>.output" al unui conector) sau oferiți-i o sursă de valoare.';
7
7
  var agentInputRefs_ambiguousUnderscoreRoot_message = "Referința promptului este „$vars.{{ref}}”, dar numele „{{rootSegment}}” conține „__”, care este rezervat ca separator de codificare pentru input-ul agentului și nu poate fi convertit dus-întors. Redenumiți-l pentru a elimina caracterul de subliniere dublu.";
@@ -105,57 +105,57 @@ var ro_default = {
105
105
  triggerRequired_message
106
106
  };
107
107
  export {
108
- triggerRequired_message,
109
- singleConversationTrigger_message,
110
- scriptBody_mustache_message,
111
- schemaValidator_validation_genericError,
112
- schemaValidator_typeMismatch_message,
113
- schemaValidator_required_message,
114
- schemaValidator_outOfRange_message,
115
- schemaValidator_invalidPattern_message,
116
- schemaValidator_invalidField_message,
117
- schemaValidator_invalidEnum_message,
118
- schemaValidator_genericKeyword_message,
119
- outputMapping_missing_message,
120
- ixpSchemaDraft_invalid_message,
121
- ixpSchemaDraft_invalidWithDetail_message,
122
- hitlQuickForm_fieldLabelRequired_message,
123
- hitlQuickForm_emptySchema_message,
124
- governance_temperatureExceeded_message,
125
- governance_noAllowedModel_message,
126
- governance_modelNotAvailable_message,
127
- governance_maxTokensExceeded_message,
128
- governance_maxIterationsExceeded_message,
129
- governance_hitlRequired_message,
130
- escalation_recipientRequired_message,
131
- escalation_quickFormDuplicateFieldLabel_message,
132
- escalation_nameRequired_message,
133
- escalation_appRequired_message,
134
- doWhile_limitOutOfRange_message,
135
- ro_default as default,
136
- dataTransform_noOperations_message,
137
- dataTransform_missingCollection_message,
138
- dataTransform_mapNoMappings_message,
139
- dataTransform_mapMissingField_message,
140
- dataTransform_groupByMissingField_message,
141
- dataTransform_groupByAggMissingOutputName_message,
142
- dataTransform_groupByAggMissingField_message,
143
- dataTransform_filterNoConditions_message,
144
- dataTransform_filterMissingField_message,
145
- dataTransform_customScriptMissing_message,
146
- conversationalVoice_callContextRequired_message,
147
- conversationalVoice_callContextInvalid_message,
148
- conversationalVoiceEndCall_callContextInvalid_message,
149
- conditionExpression_required_message,
150
- conditionExpression_invalid_message,
151
- conditionExpression_incomplete_message,
152
- conditionExpression_decisionWrapped_message,
153
- agentInputRefs_unresolvedRef_message,
154
- agentInputRefs_reservedNamespace_message,
155
- agentInputRefs_reservedMetadataRoot_message,
156
- agentInputRefs_ambiguousUnderscoreRoot_message,
108
+ agentDuplicateToolNames_duplicateName_message,
157
109
  agentEmptyVar_unwrittenVariable_message,
158
- agentDuplicateToolNames_duplicateName_message
110
+ agentInputRefs_ambiguousUnderscoreRoot_message,
111
+ agentInputRefs_reservedMetadataRoot_message,
112
+ agentInputRefs_reservedNamespace_message,
113
+ agentInputRefs_unresolvedRef_message,
114
+ conditionExpression_decisionWrapped_message,
115
+ conditionExpression_incomplete_message,
116
+ conditionExpression_invalid_message,
117
+ conditionExpression_required_message,
118
+ conversationalVoiceEndCall_callContextInvalid_message,
119
+ conversationalVoice_callContextInvalid_message,
120
+ conversationalVoice_callContextRequired_message,
121
+ dataTransform_customScriptMissing_message,
122
+ dataTransform_filterMissingField_message,
123
+ dataTransform_filterNoConditions_message,
124
+ dataTransform_groupByAggMissingField_message,
125
+ dataTransform_groupByAggMissingOutputName_message,
126
+ dataTransform_groupByMissingField_message,
127
+ dataTransform_mapMissingField_message,
128
+ dataTransform_mapNoMappings_message,
129
+ dataTransform_missingCollection_message,
130
+ dataTransform_noOperations_message,
131
+ ro_default as default,
132
+ doWhile_limitOutOfRange_message,
133
+ escalation_appRequired_message,
134
+ escalation_nameRequired_message,
135
+ escalation_quickFormDuplicateFieldLabel_message,
136
+ escalation_recipientRequired_message,
137
+ governance_hitlRequired_message,
138
+ governance_maxIterationsExceeded_message,
139
+ governance_maxTokensExceeded_message,
140
+ governance_modelNotAvailable_message,
141
+ governance_noAllowedModel_message,
142
+ governance_temperatureExceeded_message,
143
+ hitlQuickForm_emptySchema_message,
144
+ hitlQuickForm_fieldLabelRequired_message,
145
+ ixpSchemaDraft_invalidWithDetail_message,
146
+ ixpSchemaDraft_invalid_message,
147
+ outputMapping_missing_message,
148
+ schemaValidator_genericKeyword_message,
149
+ schemaValidator_invalidEnum_message,
150
+ schemaValidator_invalidField_message,
151
+ schemaValidator_invalidPattern_message,
152
+ schemaValidator_outOfRange_message,
153
+ schemaValidator_required_message,
154
+ schemaValidator_typeMismatch_message,
155
+ schemaValidator_validation_genericError,
156
+ scriptBody_mustache_message,
157
+ singleConversationTrigger_message,
158
+ triggerRequired_message
159
159
  };
160
160
 
161
- //# debugId=56D73E4D01E32FEC64756E2164756E21
161
+ //# debugId=BF10298C1139774564756E2164756E21
@@ -1,5 +1,5 @@
1
1
  import"./packager-tool-sc961w0q.js";
2
- import"./packager-tool-wckvcay0.js";
2
+ import"./packager-tool-1yh8g550.js";
3
3
 
4
4
  // ../../node_modules/@uipath/flow-core/dist/ru-GSCT4ARZ.js
5
5
  var ru_default = {};
@@ -0,0 +1,10 @@
1
+ import"./packager-tool-c23zrhj8.js";
2
+ import"./packager-tool-1yh8g550.js";
3
+
4
+ // ../../node_modules/@uipath/flow-schema/dist/ru-WBLQ5B2U.js
5
+ var ru_default = {};
6
+ export {
7
+ ru_default as default
8
+ };
9
+
10
+ //# debugId=18200F1245D66B3E64756E2164756E21
@@ -0,0 +1,377 @@
1
+ import {
2
+ contextEntry,
3
+ missingContextKeys,
4
+ readActivityTypeId
5
+ } from "./packager-tool-ty1t2byf.js";
6
+ import"./packager-tool-1yh8g550.js";
7
+
8
+ // src/services/strict-case-rules.ts
9
+ import { Script } from "node:vm";
10
+ var FORMAL_ARG_ID = /^v[A-Za-z0-9]{8}$/;
11
+ var asRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : undefined;
12
+ var asArray = (value) => Array.isArray(value) ? value : [];
13
+ var nodeType = (node) => typeof node.type === "string" ? node.type : "";
14
+ var isStage = (node) => nodeType(node).startsWith("case-management:Stage") || nodeType(node) === "case-management:Stage";
15
+ var checkStagesHaveTasks = (nodes) => {
16
+ const issues = [];
17
+ for (const node of nodes) {
18
+ if (!isStage(node))
19
+ continue;
20
+ const data = asRecord(node.data);
21
+ const lanes = asArray(data?.tasks);
22
+ const taskCount = lanes.reduce((total, lane) => total + asArray(lane).length, 0);
23
+ if (taskCount > 0)
24
+ continue;
25
+ const id = typeof node.id === "string" ? node.id : "?";
26
+ issues.push({
27
+ code: "STRICT_STAGE_NO_TASKS",
28
+ path: `nodes[${id}].data.tasks`,
29
+ severity: "error",
30
+ message: `Stage "${id}" declares no tasks. A stage with empty task ` + "lanes deploys and then has nothing to run, so the case " + "enters it and stops."
31
+ });
32
+ }
33
+ return issues;
34
+ };
35
+ var checkNoUnresolvedXrefs = (value, path, issues) => {
36
+ if (typeof value === "string") {
37
+ if (value.includes("$xref(")) {
38
+ issues.push({
39
+ code: "STRICT_XREF_UNRESOLVED",
40
+ path,
41
+ severity: "error",
42
+ message: `Unresolved authoring marker in "${value}". "$xref(...)" ` + "is a placeholder the converter does not expand — resolve " + "it to the real id before packing."
43
+ });
44
+ }
45
+ return;
46
+ }
47
+ if (Array.isArray(value)) {
48
+ value.forEach((entry, index) => {
49
+ checkNoUnresolvedXrefs(entry, `${path}[${index}]`, issues);
50
+ });
51
+ return;
52
+ }
53
+ const record = asRecord(value);
54
+ if (!record)
55
+ return;
56
+ for (const [key, entry] of Object.entries(record)) {
57
+ checkNoUnresolvedXrefs(entry, `${path}.${key}`, issues);
58
+ }
59
+ };
60
+ var jsSyntaxError = (source) => {
61
+ try {
62
+ new Script(source);
63
+ return null;
64
+ } catch (error) {
65
+ return error instanceof SyntaxError ? error.message : null;
66
+ }
67
+ };
68
+ var checkJsExpressionsParse = (value, path, issues) => {
69
+ if (typeof value === "string") {
70
+ if (!value.startsWith("=js:"))
71
+ return;
72
+ const source = value.slice(4);
73
+ const failure = jsSyntaxError(source);
74
+ if (failure === null)
75
+ return;
76
+ const escaped = source.replace(/\r\n|\r|\n/g, String.raw`\n`);
77
+ const rawLineBreak = escaped !== source && jsSyntaxError(escaped) === null;
78
+ issues.push({
79
+ code: "STRICT_JS_EXPRESSION_INVALID",
80
+ path,
81
+ severity: "error",
82
+ message: `This \`=js:\` expression does not parse: ${failure}. The ` + "runtime evaluates it as JavaScript, so the element faults on " + "its first evaluation." + (rawLineBreak ? " It carries a raw line break: write `\\\\n` in the JSON " + "so the JavaScript source carries `\\n`." : "") + ` Offending text: ${JSON.stringify(value.slice(0, 70))}`
83
+ });
84
+ return;
85
+ }
86
+ if (Array.isArray(value)) {
87
+ value.forEach((entry, index) => {
88
+ checkJsExpressionsParse(entry, `${path}[${index}]`, issues);
89
+ });
90
+ return;
91
+ }
92
+ const record = asRecord(value);
93
+ if (!record)
94
+ return;
95
+ for (const [key, entry] of Object.entries(record)) {
96
+ checkJsExpressionsParse(entry, `${path}.${key}`, issues);
97
+ }
98
+ };
99
+ var checkConditionExpressionPlacement = (conditions, path) => {
100
+ const issues = [];
101
+ asArray(conditions).forEach((condition, index) => {
102
+ const record = asRecord(condition);
103
+ if (!record)
104
+ return;
105
+ if (typeof record.conditionExpression !== "string")
106
+ return;
107
+ issues.push({
108
+ code: "STRICT_CONDITION_EXPR_HOISTED",
109
+ path: `${path}[${index}].conditionExpression`,
110
+ severity: "error",
111
+ message: '"conditionExpression" sits on the condition object. The ' + "scheduler reads it from a rule inside rules[][], so here it " + "is ignored and the condition fires ungated — move it onto " + "the rule it is meant to guard."
112
+ });
113
+ });
114
+ return issues;
115
+ };
116
+ var collectConditionIssues = (nodes, metadata) => {
117
+ const issues = [];
118
+ for (const node of nodes) {
119
+ const id = typeof node.id === "string" ? node.id : "?";
120
+ const data = asRecord(node.data);
121
+ issues.push(...checkConditionExpressionPlacement(data?.entryConditions, `nodes[${id}].data.entryConditions`), ...checkConditionExpressionPlacement(data?.exitConditions, `nodes[${id}].data.exitConditions`));
122
+ for (const lane of asArray(data?.tasks)) {
123
+ for (const task of asArray(lane)) {
124
+ const taskRecord = asRecord(task);
125
+ if (!taskRecord)
126
+ continue;
127
+ const taskId = typeof taskRecord.id === "string" ? taskRecord.id : "?";
128
+ issues.push(...checkConditionExpressionPlacement(taskRecord.entryConditions, `nodes[${id}].data.tasks[${taskId}].entryConditions`));
129
+ }
130
+ }
131
+ }
132
+ issues.push(...checkConditionExpressionPlacement(metadata?.caseExitRules, "metadata.caseExitRules"));
133
+ return issues;
134
+ };
135
+ var checkVariableContract = (variables) => {
136
+ const issues = [];
137
+ for (const slot of ["inputs", "outputs", "inputOutputs"]) {
138
+ asArray(variables?.[slot]).forEach((entry, index) => {
139
+ const variable = asRecord(entry);
140
+ if (!variable)
141
+ return;
142
+ const name = typeof variable.name === "string" ? variable.name : `#${index}`;
143
+ const path = `variables.${slot}[${name}]`;
144
+ const id = variable.id;
145
+ if (slot !== "inputOutputs") {
146
+ if (typeof id !== "string" || !FORMAL_ARG_ID.test(id)) {
147
+ issues.push({
148
+ code: "STRICT_FORMAL_ARG_ID",
149
+ path: `${path}.id`,
150
+ severity: "error",
151
+ message: `Formal argument "${name}" has id ` + `"${String(id)}", which is not the generated ` + 'form "v" + 8 characters. An id copied from the ' + "name collides across renames and does not match " + "what the converter emits."
152
+ });
153
+ }
154
+ }
155
+ if (variable.default !== undefined && typeof variable.default !== "string") {
156
+ issues.push({
157
+ code: "STRICT_DEFAULT_NOT_STRING",
158
+ path: `${path}.default`,
159
+ severity: "error",
160
+ message: `Default for "${name}" is a ` + `${Array.isArray(variable.default) ? "array" : typeof variable.default} ` + "and must be a JSON string. The converter drops " + "non-string defaults without saying so, so the value " + "silently disappears from entry-points.json."
161
+ });
162
+ }
163
+ });
164
+ }
165
+ return issues;
166
+ };
167
+ var checkInputOutputCompanions = (variables, nodes) => {
168
+ const issues = [];
169
+ const companions = new Set(asArray(variables?.inputOutputs).map((entry) => asRecord(entry)?.name).filter((name) => typeof name === "string"));
170
+ const unbound = (name) => !companions.has(name);
171
+ asArray(variables?.inputs).forEach((entry) => {
172
+ const variable = asRecord(entry);
173
+ const name = variable?.name;
174
+ if (typeof name !== "string" || !unbound(name))
175
+ return;
176
+ issues.push({
177
+ code: "STRICT_INPUTOUTPUTS_COMPANION",
178
+ path: `variables.inputs[${name}]`,
179
+ severity: "error",
180
+ message: `In-argument "${name}" has no entry of the same name in ` + "variables.inputOutputs[]. The companion is what carries the " + "binding, so without it the argument is declared and never " + "bound."
181
+ });
182
+ });
183
+ for (const node of nodes) {
184
+ const nodeId = typeof node.id === "string" ? node.id : "?";
185
+ const data = asRecord(node.data);
186
+ for (const lane of asArray(data?.tasks)) {
187
+ for (const task of asArray(lane)) {
188
+ const taskRecord = asRecord(task);
189
+ if (!taskRecord)
190
+ continue;
191
+ const taskId = typeof taskRecord.id === "string" ? taskRecord.id : "?";
192
+ for (const output of asArray(asRecord(taskRecord.data)?.outputs)) {
193
+ const record = asRecord(output);
194
+ if (record?.custom !== true)
195
+ continue;
196
+ const variableName = record.var;
197
+ if (typeof variableName !== "string" || !unbound(variableName)) {
198
+ continue;
199
+ }
200
+ const label = typeof record.name === "string" ? record.name : variableName;
201
+ issues.push({
202
+ code: "STRICT_INPUTOUTPUTS_COMPANION",
203
+ path: `nodes[${nodeId}].data.tasks[${taskId}].data.outputs[${label}]`,
204
+ severity: "error",
205
+ message: `Custom output "${label}" writes to ` + `"${variableName}", which has no entry in ` + "variables.inputOutputs[]. Without the companion " + "the value has nowhere to land."
206
+ });
207
+ }
208
+ }
209
+ }
210
+ }
211
+ return issues;
212
+ };
213
+ var checkOutputIdUniqueness = (nodes) => {
214
+ const issues = [];
215
+ const seen = new Map;
216
+ const reported = new Set;
217
+ for (const node of nodes) {
218
+ const nodeId = typeof node.id === "string" ? node.id : "?";
219
+ const data = asRecord(node.data);
220
+ for (const lane of asArray(data?.tasks)) {
221
+ for (const task of asArray(lane)) {
222
+ const taskRecord = asRecord(task);
223
+ if (!taskRecord)
224
+ continue;
225
+ const taskId = typeof taskRecord.id === "string" ? taskRecord.id : "?";
226
+ const taskData = asRecord(taskRecord.data);
227
+ for (const output of asArray(taskData?.outputs)) {
228
+ const id = asRecord(output)?.id;
229
+ if (typeof id !== "string" || id === "")
230
+ continue;
231
+ const owner = `${nodeId}/${taskId}`;
232
+ const previous = seen.get(id);
233
+ if (previous !== undefined && !reported.has(id)) {
234
+ reported.add(id);
235
+ issues.push({
236
+ code: "STRICT_OUTPUT_ID_DUPLICATE",
237
+ path: `nodes[${nodeId}].data.tasks[${taskId}].data.outputs[${id}]`,
238
+ severity: "error",
239
+ message: `Output id "${id}" is used by two tasks ` + `(${previous} and ${owner}). Output ids are ` + "the write target, so the second write lands " + "on the first task's variable."
240
+ });
241
+ }
242
+ if (previous === undefined)
243
+ seen.set(id, owner);
244
+ }
245
+ }
246
+ }
247
+ }
248
+ return issues;
249
+ };
250
+ var checkConnectorRuleContext = (nodes) => {
251
+ const issues = [];
252
+ const visitRule = (rule, path) => {
253
+ if (rule.rule !== "wait-for-connector")
254
+ return;
255
+ const context = asRecord(rule.uipath)?.context;
256
+ const missing = missingContextKeys(context);
257
+ if (missing.length > 0) {
258
+ issues.push({
259
+ code: "STRICT_CONNECTOR_CONTEXT_INCOMPLETE",
260
+ path: `${path}.uipath.context`,
261
+ severity: "error",
262
+ message: `Connector rule "${String(rule.id ?? "?")}" is missing ` + `context entries: ${missing.join(", ")}. A rule carrying ` + "the connection but not the activity metadata deploys and " + "then has no event to wait for."
263
+ });
264
+ }
265
+ if (contextEntry(context, "metadata") === undefined)
266
+ return;
267
+ if (readActivityTypeId(context) === undefined) {
268
+ issues.push({
269
+ code: "STRICT_CONNECTOR_ACTIVITY_TYPE_ID",
270
+ path: `${path}.uipath.context[metadata].body.activityPropertyConfiguration.UiPathActivityTypeId`,
271
+ severity: "error",
272
+ message: `Connector rule "${String(rule.id ?? "?")}" has metadata ` + "with no UiPathActivityTypeId. The connection id alone " + "does not identify the event to wait for."
273
+ });
274
+ }
275
+ };
276
+ const visitConditions = (conditions, path) => {
277
+ asArray(conditions).forEach((condition, conditionIndex) => {
278
+ const record = asRecord(condition);
279
+ if (!record)
280
+ return;
281
+ asArray(record.rules).forEach((group, groupIndex) => {
282
+ asArray(group).forEach((rule, ruleIndex) => {
283
+ const ruleRecord = asRecord(rule);
284
+ if (!ruleRecord)
285
+ return;
286
+ visitRule(ruleRecord, `${path}[${conditionIndex}].rules[${groupIndex}][${ruleIndex}]`);
287
+ });
288
+ });
289
+ });
290
+ };
291
+ for (const node of nodes) {
292
+ const id = typeof node.id === "string" ? node.id : "?";
293
+ const data = asRecord(node.data);
294
+ visitConditions(data?.entryConditions, `nodes[${id}].data.entryConditions`);
295
+ visitConditions(data?.exitConditions, `nodes[${id}].data.exitConditions`);
296
+ for (const lane of asArray(data?.tasks)) {
297
+ for (const task of asArray(lane)) {
298
+ const taskRecord = asRecord(task);
299
+ if (!taskRecord)
300
+ continue;
301
+ const taskId = typeof taskRecord.id === "string" ? taskRecord.id : "?";
302
+ visitConditions(taskRecord.entryConditions, `nodes[${id}].data.tasks[${taskId}].entryConditions`);
303
+ }
304
+ }
305
+ }
306
+ return issues;
307
+ };
308
+ var RECIPIENT_PREFIXES = [
309
+ "User:",
310
+ "UserGroup:",
311
+ "Role:",
312
+ "Email:",
313
+ "Expression:"
314
+ ];
315
+ var recipientIssues = (recipient, path) => {
316
+ const value = recipient.Value;
317
+ if (typeof value !== "string")
318
+ return [];
319
+ const prefix = RECIPIENT_PREFIXES.find((candidate) => value.startsWith(candidate));
320
+ if (prefix !== undefined) {
321
+ return [
322
+ {
323
+ code: "STRICT_RECIPIENT_PREFIX_LEFT",
324
+ path: `${path}.Value`,
325
+ severity: "error",
326
+ message: `Recipient value "${value}" still carries the ` + `"${prefix}" marker. That marker picks the Type and is ` + "removed on the way in, so the assignment looks up a " + "name nobody has and the task ships assigned to no one."
327
+ }
328
+ ];
329
+ }
330
+ if (!value.startsWith("=vars.") || recipient.Type === 3)
331
+ return [];
332
+ return [
333
+ {
334
+ code: "STRICT_RECIPIENT_EXPRESSION_TYPE",
335
+ path: `${path}.Type`,
336
+ severity: "error",
337
+ message: `Recipient value "${value}" is an expression but carries ` + `Type ${String(recipient.Type)}. Type 0 sends it to a user ` + "lookup, Type 1 to a group lookup and Type 2 to an email " + "lookup, all on the literal text. An expression recipient " + "is Type 3."
338
+ }
339
+ ];
340
+ };
341
+ var checkActionRecipientShape = (nodes) => nodes.flatMap((node) => {
342
+ const nodeId = typeof node.id === "string" ? node.id : "?";
343
+ const lanes = asArray(asRecord(node.data)?.tasks);
344
+ return lanes.flatMap((lane) => asArray(lane).flatMap((task) => {
345
+ const taskRecord = asRecord(task);
346
+ const recipient = asRecord(asRecord(taskRecord?.data)?.recipient);
347
+ if (!taskRecord || !recipient)
348
+ return [];
349
+ const taskId = typeof taskRecord.id === "string" ? taskRecord.id : "?";
350
+ return recipientIssues(recipient, `nodes[${nodeId}].data.tasks[${taskId}].data.recipient`);
351
+ }));
352
+ });
353
+ var runStrictCaseRules = (parsed) => {
354
+ const nodes = Array.isArray(parsed.nodes) ? parsed.nodes : [];
355
+ const variables = asRecord(parsed.variables);
356
+ const metadata = asRecord(parsed.metadata);
357
+ const xrefIssues = [];
358
+ checkNoUnresolvedXrefs(parsed, "(root)", xrefIssues);
359
+ const jsSyntaxIssues = [];
360
+ checkJsExpressionsParse(parsed, "(root)", jsSyntaxIssues);
361
+ return [
362
+ ...checkStagesHaveTasks(nodes),
363
+ ...xrefIssues,
364
+ ...jsSyntaxIssues,
365
+ ...collectConditionIssues(nodes, metadata),
366
+ ...checkVariableContract(variables),
367
+ ...checkInputOutputCompanions(variables, nodes),
368
+ ...checkOutputIdUniqueness(nodes),
369
+ ...checkConnectorRuleContext(nodes),
370
+ ...checkActionRecipientShape(nodes)
371
+ ];
372
+ };
373
+ export {
374
+ runStrictCaseRules
375
+ };
376
+
377
+ //# debugId=A26096E08E3DBD7464756E2164756E21