@uipath/case-tool 1.200.0-preview.109 → 1.201.0-preview.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,252 @@
1
+ import {
2
+ OutputFormatter,
3
+ RESULTS,
4
+ getOutputFormat,
5
+ getOutputFormatExplicit,
6
+ processContext
7
+ } from "./packager-tool-pcd0vhvd.js";
8
+ import {
9
+ getFileSystem
10
+ } from "./packager-tool-1cb0d5e0.js";
11
+ import"./packager-tool-wckvcay0.js";
12
+
13
+ // ../builder-sdk/src/argv.ts
14
+ function addValue(argv, flag, value) {
15
+ if (typeof value === "string") {
16
+ argv.push(flag, value);
17
+ }
18
+ }
19
+
20
+ // ../builder-sdk/src/delegate.ts
21
+ import { spawn } from "node:child_process";
22
+ import { createRequire } from "node:module";
23
+ var MINIMUM_FLOW_SDK_VERSION = "1.1.0";
24
+ function commandLabel(family, verb) {
25
+ return `uip maestro ${family} ${verb}`;
26
+ }
27
+ function fail(message, instructions) {
28
+ OutputFormatter.error({
29
+ Result: RESULTS.Failure,
30
+ Message: message,
31
+ Instructions: instructions
32
+ });
33
+ return 1;
34
+ }
35
+ function parseVersion(version) {
36
+ const match = /^(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/.exec(version);
37
+ if (!match)
38
+ return null;
39
+ return [
40
+ Number(match[1]),
41
+ Number(match[2]),
42
+ Number(match[3]),
43
+ match[4] !== undefined
44
+ ];
45
+ }
46
+ function versionMeetsFloor(version, floor) {
47
+ const installed = parseVersion(version);
48
+ const minimum = parseVersion(floor);
49
+ if (!installed || !minimum)
50
+ return false;
51
+ for (let index = 0;index < 3; index++) {
52
+ if (installed[index] !== minimum[index]) {
53
+ return installed[index] > minimum[index];
54
+ }
55
+ }
56
+ return !installed[3] || minimum[3];
57
+ }
58
+ async function runChild(cliPath, args, cwd, label) {
59
+ return await new Promise((resolve) => {
60
+ const child = spawn("node", [cliPath, ...args], {
61
+ cwd,
62
+ env: process.env,
63
+ stdio: "inherit"
64
+ });
65
+ child.once("error", (error) => {
66
+ resolve(fail(`${label}: ${error.message}`, "Check that node is on PATH, then retry."));
67
+ });
68
+ child.once("exit", (code, signal) => {
69
+ if (code !== null) {
70
+ resolve(code);
71
+ return;
72
+ }
73
+ resolve(fail(`${label}: SDK process ended with signal ${signal ?? "unknown"}.`, "Retry the command."));
74
+ });
75
+ });
76
+ }
77
+ async function delegateToFlowSdk({
78
+ family,
79
+ commandVerb,
80
+ sdkVerb = commandVerb,
81
+ argv,
82
+ cwd
83
+ }) {
84
+ const fs = getFileSystem();
85
+ const workspace = cwd ?? fs.env.cwd();
86
+ const label = commandLabel(family, commandVerb);
87
+ let packagePath;
88
+ try {
89
+ packagePath = createRequire(import.meta.url).resolve("@uipath/flow-sdk/package.json", { paths: [workspace] });
90
+ } catch {
91
+ return fail(`${label}: @uipath/flow-sdk is not installed in this workspace.`, "Add it to this project's dependencies: npm install --save-dev @uipath/flow-sdk (requires an .npmrc routing @uipath to https://npm.pkg.github.com/).");
92
+ }
93
+ const packageText = await fs.readFile(packagePath, "utf-8");
94
+ if (packageText === null) {
95
+ return fail(`${label}: could not read ${packagePath}.`, "Reinstall @uipath/flow-sdk, then retry.");
96
+ }
97
+ let version;
98
+ try {
99
+ const parsed = JSON.parse(packageText);
100
+ version = typeof parsed.version === "string" ? parsed.version : "";
101
+ } catch {
102
+ version = "";
103
+ }
104
+ if (!versionMeetsFloor(version, MINIMUM_FLOW_SDK_VERSION)) {
105
+ return fail(`${label}: found @uipath/flow-sdk ${version || "with no valid version"}; need >= ${MINIMUM_FLOW_SDK_VERSION}.`, "Run: npm install --save-dev @uipath/flow-sdk@latest.");
106
+ }
107
+ const cliPath = fs.path.join(fs.path.dirname(packagePath), "dist", "cli", "index.js");
108
+ return await runChild(cliPath, [family, sdkVerb, ...argv], workspace, label);
109
+ }
110
+
111
+ // ../builder-sdk/src/examples.ts
112
+ function sdkCliExample(description, command, message) {
113
+ return [
114
+ {
115
+ Description: description,
116
+ Command: command,
117
+ Output: {
118
+ Code: "SdkCliOutput",
119
+ Data: { Message: message }
120
+ }
121
+ }
122
+ ];
123
+ }
124
+
125
+ // ../builder-sdk/src/commands/check.ts
126
+ var CHECK_EXAMPLES = {
127
+ flow: { input: "Order.flow.ts", message: "✓ no issues" },
128
+ case: { input: "Claims.case.ts", message: "check: OK" },
129
+ bpmn: { input: "Approval.bpmn.ts", message: "check: ok." }
130
+ };
131
+ var registerCheckCommand = (program, family) => {
132
+ const command = program.previewCommand("check <input>").description("Run the authoring-time SDK analyzer on source or an artifact.").option("--source", "Check authored TypeScript").option("--compiled", "Check the compiled artifact");
133
+ if (family === "flow") {
134
+ command.option("--library <dir>", "Connector library directory (source checks also honor $FLOW_SDK_LIBRARY_JSON)").option("--json", "Print compiled-check diagnostics as JSON").option("--uip", "Resolve missing schemas with the UiPath CLI").option("--max-errors <count>", "Stop after this many compiled-check errors").option("--script-determinism", "Check script blocks for non-deterministic calls").option("--quiet", "Suppress warnings and information");
135
+ }
136
+ const example = CHECK_EXAMPLES[family];
137
+ command.examples(sdkCliExample(`Check a ${family} source file before compiling it`, `uip maestro ${family} check ${example.input} --source`, example.message)).trackedAction(processContext, async (input, options) => {
138
+ const argv = [input];
139
+ if (options.source)
140
+ argv.push("--source");
141
+ if (options.compiled)
142
+ argv.push("--compiled");
143
+ addValue(argv, "--library", options.library);
144
+ if (options.json || getOutputFormatExplicit() && getOutputFormat() === "json")
145
+ argv.push("--json");
146
+ if (options.uip)
147
+ argv.push("--uip");
148
+ addValue(argv, "--max-errors", options.maxErrors);
149
+ if (options.scriptDeterminism)
150
+ argv.push("--script-determinism");
151
+ if (options.quiet)
152
+ argv.push("--quiet");
153
+ const code = await delegateToFlowSdk({
154
+ family,
155
+ commandVerb: "check",
156
+ argv
157
+ });
158
+ if (code !== 0)
159
+ processContext.exit(code);
160
+ });
161
+ };
162
+ // ../builder-sdk/src/commands/compile.ts
163
+ var COMPILE_EXAMPLES = {
164
+ flow: {
165
+ source: "Order.flow.ts",
166
+ output: "Order.flow",
167
+ message: "compile: wrote Order.flow (3 nodes, 2 edges)"
168
+ },
169
+ case: {
170
+ source: "Claims.case.ts",
171
+ output: "caseplan.json",
172
+ message: "compile: wrote caseplan.json (3 stage(s))"
173
+ },
174
+ bpmn: {
175
+ source: "Approval.bpmn.ts",
176
+ output: "Approval.bpmn",
177
+ message: "compile: wrote Approval.bpmn (4 element(s))"
178
+ }
179
+ };
180
+ var registerCompileCommand = (program, family) => {
181
+ const command = program.previewCommand("compile <source>").description(`Compile authored TypeScript to a ${family} artifact.`).option("-o, --output <file>", "Output artifact path").option("--library <dir>", "Connector library directory").option("--bindings <file>", "bindings.json path");
182
+ if (family !== "bpmn") {
183
+ command.option("--connectors-local <dir>", "Connection-resolved connector overlay");
184
+ }
185
+ if (family === "flow") {
186
+ command.option("--no-check", "Skip the source-level check");
187
+ }
188
+ const example = COMPILE_EXAMPLES[family];
189
+ command.examples(sdkCliExample(`Compile a ${family} source file to an artifact`, `uip maestro ${family} compile ${example.source} --output ${example.output}`, example.message)).trackedAction(processContext, async (source, options) => {
190
+ const argv = [source];
191
+ addValue(argv, "-o", options.output);
192
+ addValue(argv, "--library", options.library);
193
+ addValue(argv, "--bindings", options.bindings);
194
+ addValue(argv, "--connectors-local", options.connectorsLocal);
195
+ if (options.check === false)
196
+ argv.push("--no-check");
197
+ const code = await delegateToFlowSdk({
198
+ family,
199
+ commandVerb: "compile",
200
+ argv
201
+ });
202
+ if (code !== 0)
203
+ processContext.exit(code);
204
+ });
205
+ };
206
+ // ../builder-sdk/src/commands/decompile.ts
207
+ var DECOMPILE_EXAMPLES = {
208
+ flow: {
209
+ input: "Order.flow",
210
+ output: "Order.flow.ts",
211
+ message: "flow-decompile: wrote Order.flow.ts"
212
+ },
213
+ case: {
214
+ input: "caseplan.json",
215
+ output: "Claims.case.ts",
216
+ message: "decompile: wrote Claims.case.ts"
217
+ }
218
+ };
219
+ var registerDecompileCommand = (program, family) => {
220
+ const command = program.previewCommand("decompile <input>").description(`Convert a ${family === "flow" ? ".flow" : "caseplan.json"} artifact to authored TypeScript.`).option("-o, --output <file>", `Output ${family === "flow" ? ".flow.ts" : ".case.ts"} path`).option("--import <specifier>", "SDK import specifier in generated source");
221
+ if (family === "flow") {
222
+ command.option("--strict", "Fail on unsupported constructs").option("--no-pipeline", "Do not emit a brownfield pipeline helper");
223
+ }
224
+ const example = DECOMPILE_EXAMPLES[family];
225
+ command.examples(sdkCliExample(`Convert a ${family} artifact back to authored TypeScript`, `uip maestro ${family} decompile ${example.input} --output ${example.output}`, example.message)).trackedAction(processContext, async (input, options) => {
226
+ const argv = [input];
227
+ addValue(argv, "-o", options.output);
228
+ addValue(argv, "--import", options.import);
229
+ if (options.strict)
230
+ argv.push("--strict");
231
+ if (options.pipeline === false)
232
+ argv.push("--no-pipeline");
233
+ const code = await delegateToFlowSdk({
234
+ family,
235
+ commandVerb: "decompile",
236
+ argv
237
+ });
238
+ if (code !== 0)
239
+ processContext.exit(code);
240
+ });
241
+ };
242
+ // src/commands/authoring.ts
243
+ var registerCaseAuthoringCommands = (program) => {
244
+ registerCompileCommand(program, "case");
245
+ registerCheckCommand(program, "case");
246
+ registerDecompileCommand(program, "case");
247
+ };
248
+ export {
249
+ registerCaseAuthoringCommands
250
+ };
251
+
252
+ //# debugId=15A8978EA34C2B0F64756E2164756E21
@@ -3,7 +3,7 @@ import {
3
3
  } from "./packager-tool-9qecd4wb.js";
4
4
  import {
5
5
  AUTH_CANCELLED_ERROR_CODE
6
- } from "./packager-tool-1ps2qeqg.js";
6
+ } from "./packager-tool-5arsyj36.js";
7
7
  import"./packager-tool-wckvcay0.js";
8
8
 
9
9
  // ../auth/src/strategies/browser-strategy.ts
@@ -664,6 +664,35 @@ import {
664
664
  manifest_node_transform_form_transformSection_title,
665
665
  manifest_node_transform_output_error_description,
666
666
  manifest_node_transform_output_output_description,
667
+ manifest_node_voiceAgent_description,
668
+ manifest_node_voiceAgent_display_label,
669
+ manifest_node_voiceAgent_form_callSettings_inputCallContext_description,
670
+ manifest_node_voiceAgent_form_callSettings_inputCallContext_label,
671
+ manifest_node_voiceAgent_form_callSettings_title,
672
+ manifest_node_voiceAgent_form_section1_inputSystemPrompt_componentProps_placeholder,
673
+ manifest_node_voiceAgent_form_section1_inputSystemPrompt_label,
674
+ manifest_node_voiceAgent_form_section1_inputVoiceModel_label,
675
+ manifest_node_voiceAgent_form_section1_inputVoicePersona_label,
676
+ manifest_node_voiceAgent_form_section1_title,
677
+ manifest_node_voiceAgent_form_sectionAdvanced_inputVoiceMaxTokens_label,
678
+ manifest_node_voiceAgent_form_sectionAdvanced_inputVoiceTemperature_label,
679
+ manifest_node_voiceAgent_form_sectionAdvanced_title,
680
+ manifest_node_voiceAgent_form_title,
681
+ manifest_node_voiceAgent_handle_context_label,
682
+ manifest_node_voiceAgent_handle_escalation_label,
683
+ manifest_node_voiceAgent_handle_tool_label,
684
+ manifest_node_voiceAgent_input_callContext_description,
685
+ manifest_node_voiceAgent_output_error_description,
686
+ manifest_node_voiceAgent_output_output_description,
687
+ manifest_node_voiceAgent_output_output_uipathAgentResponseMessages_description,
688
+ manifest_node_voiceAgent_output_output_uipathVoiceCallContext_conversationId_description,
689
+ manifest_node_voiceAgent_output_output_uipathVoiceCallContext_description,
690
+ manifest_node_voiceAgent_output_output_uipathVoiceCallContext_id_description,
691
+ manifest_node_voiceAgent_output_output_uipathVoiceCallContext_type_description,
692
+ manifest_node_voiceAgent_output_output_uipathVoiceSession_callEnded_description,
693
+ manifest_node_voiceAgent_output_output_uipathVoiceSession_description,
694
+ manifest_node_voiceAgent_output_output_uipathVoiceSession_endedBy_description,
695
+ manifest_node_voiceAgent_output_output_uipathVoiceSession_reason_description,
667
696
  manifest_node_voiceIncomingCall_description,
668
697
  manifest_node_voiceIncomingCall_display_label,
669
698
  manifest_node_voiceIncomingCall_output_output_description,
@@ -683,7 +712,7 @@ import {
683
712
  manifest_node_waitForMessage_output_error_description,
684
713
  manifest_node_waitForMessage_output_output_description,
685
714
  manifest_triggerToolbar_changeTriggerType_label
686
- } from "./packager-tool-qz3cg5tg.js";
715
+ } from "./packager-tool-kvgt1s4z.js";
687
716
  import"./packager-tool-sc961w0q.js";
688
717
  import"./packager-tool-wckvcay0.js";
689
718
  export {
@@ -706,6 +735,35 @@ export {
706
735
  manifest_node_voiceIncomingCall_output_output_description,
707
736
  manifest_node_voiceIncomingCall_display_label,
708
737
  manifest_node_voiceIncomingCall_description,
738
+ manifest_node_voiceAgent_output_output_uipathVoiceSession_reason_description,
739
+ manifest_node_voiceAgent_output_output_uipathVoiceSession_endedBy_description,
740
+ manifest_node_voiceAgent_output_output_uipathVoiceSession_description,
741
+ manifest_node_voiceAgent_output_output_uipathVoiceSession_callEnded_description,
742
+ manifest_node_voiceAgent_output_output_uipathVoiceCallContext_type_description,
743
+ manifest_node_voiceAgent_output_output_uipathVoiceCallContext_id_description,
744
+ manifest_node_voiceAgent_output_output_uipathVoiceCallContext_description,
745
+ manifest_node_voiceAgent_output_output_uipathVoiceCallContext_conversationId_description,
746
+ manifest_node_voiceAgent_output_output_uipathAgentResponseMessages_description,
747
+ manifest_node_voiceAgent_output_output_description,
748
+ manifest_node_voiceAgent_output_error_description,
749
+ manifest_node_voiceAgent_input_callContext_description,
750
+ manifest_node_voiceAgent_handle_tool_label,
751
+ manifest_node_voiceAgent_handle_escalation_label,
752
+ manifest_node_voiceAgent_handle_context_label,
753
+ manifest_node_voiceAgent_form_title,
754
+ manifest_node_voiceAgent_form_sectionAdvanced_title,
755
+ manifest_node_voiceAgent_form_sectionAdvanced_inputVoiceTemperature_label,
756
+ manifest_node_voiceAgent_form_sectionAdvanced_inputVoiceMaxTokens_label,
757
+ manifest_node_voiceAgent_form_section1_title,
758
+ manifest_node_voiceAgent_form_section1_inputVoicePersona_label,
759
+ manifest_node_voiceAgent_form_section1_inputVoiceModel_label,
760
+ manifest_node_voiceAgent_form_section1_inputSystemPrompt_label,
761
+ manifest_node_voiceAgent_form_section1_inputSystemPrompt_componentProps_placeholder,
762
+ manifest_node_voiceAgent_form_callSettings_title,
763
+ manifest_node_voiceAgent_form_callSettings_inputCallContext_label,
764
+ manifest_node_voiceAgent_form_callSettings_inputCallContext_description,
765
+ manifest_node_voiceAgent_display_label,
766
+ manifest_node_voiceAgent_description,
709
767
  manifest_node_transform_output_output_description,
710
768
  manifest_node_transform_output_error_description,
711
769
  manifest_node_transform_form_transformSection_title,
@@ -1373,4 +1431,4 @@ export {
1373
1431
  en_default as default
1374
1432
  };
1375
1433
 
1376
- //# debugId=969112B2F4133D1D64756E2164756E21
1434
+ //# debugId=C0C393DC9C33AD2164756E2164756E21