@uipath/vertical-solutions-tool 1.197.0-preview.64 → 1.197.0-preview.66

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 (2) hide show
  1. package/dist/tool.js +580 -11
  2. package/package.json +2 -2
package/dist/tool.js CHANGED
@@ -27537,7 +27537,7 @@ var require_src6 = __commonJS((exports) => {
27537
27537
  var package_default = {
27538
27538
  name: "@uipath/vertical-solutions-tool",
27539
27539
  license: "MIT",
27540
- version: "1.197.0-preview.64",
27540
+ version: "1.197.0-preview.66",
27541
27541
  description: "Scaffold and generate Vertical Solution projects.",
27542
27542
  private: false,
27543
27543
  repository: {
@@ -32646,9 +32646,228 @@ function getOutputFilter() {
32646
32646
  return filterSlot.get();
32647
32647
  }
32648
32648
 
32649
+ // ../common/src/telemetry/command-terminal.ts
32650
+ var recordedFailureSlot = singleton("CommandTelemetryFailure");
32651
+ var AUTH_ERROR_CODES = new Set([
32652
+ "authentication_required",
32653
+ "permission_denied"
32654
+ ]);
32655
+ var VALIDATION_ERROR_CODES = new Set(["invalid_argument"]);
32656
+ var NETWORK_HTTP_ERROR_CODES = new Set([
32657
+ "network_error",
32658
+ "rate_limited",
32659
+ "server_error",
32660
+ "not_found",
32661
+ "method_not_allowed"
32662
+ ]);
32663
+ var TIMEOUT_ERROR_CODES = new Set(["timeout"]);
32664
+ var NETWORK_OS_ERROR_CODES = new Set([
32665
+ "ECONNREFUSED",
32666
+ "ECONNRESET",
32667
+ "ENOTFOUND",
32668
+ "EAI_AGAIN",
32669
+ "EPIPE",
32670
+ "EHOSTUNREACH",
32671
+ "ENETUNREACH",
32672
+ "EAI_FAIL"
32673
+ ]);
32674
+ var TIMEOUT_OS_ERROR_CODES = new Set(["ETIMEDOUT", "ESOCKETTIMEDOUT"]);
32675
+ var TLS_ERROR_CODES2 = new Set([
32676
+ "SELF_SIGNED_CERT_IN_CHAIN",
32677
+ "DEPTH_ZERO_SELF_SIGNED_CERT",
32678
+ "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
32679
+ "UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
32680
+ "UNABLE_TO_GET_ISSUER_CERT",
32681
+ "CERT_HAS_EXPIRED",
32682
+ "CERT_UNTRUSTED",
32683
+ "ERR_TLS_CERT_ALTNAME_INVALID"
32684
+ ]);
32685
+ var MISSING_DEPENDENCY_CODES = new Set([
32686
+ "MODULE_NOT_FOUND",
32687
+ "ERR_MODULE_NOT_FOUND"
32688
+ ]);
32689
+ var INTERNAL_ERROR_NAMES = new Set([
32690
+ "TypeError",
32691
+ "ReferenceError",
32692
+ "SyntaxError",
32693
+ "RangeError"
32694
+ ]);
32695
+ function isRecord(value) {
32696
+ return value !== null && typeof value === "object";
32697
+ }
32698
+ function stringField(value, field) {
32699
+ if (!isRecord(value)) {
32700
+ return;
32701
+ }
32702
+ const raw = value[field];
32703
+ return typeof raw === "string" ? raw : undefined;
32704
+ }
32705
+ function numberField(value, field) {
32706
+ if (!isRecord(value)) {
32707
+ return;
32708
+ }
32709
+ const raw = value[field];
32710
+ return typeof raw === "number" ? raw : undefined;
32711
+ }
32712
+ function findStringInCauseChain(error, field) {
32713
+ let current = error;
32714
+ for (let depth = 0;depth < 5 && current !== null && typeof current === "object"; depth++) {
32715
+ const value = stringField(current, field);
32716
+ if (value) {
32717
+ return value;
32718
+ }
32719
+ current = current.cause;
32720
+ }
32721
+ return;
32722
+ }
32723
+ function findCodeInCauseChain(error) {
32724
+ return findStringInCauseChain(error, "code");
32725
+ }
32726
+ function isSpawnEnoent(error) {
32727
+ const code = findCodeInCauseChain(error);
32728
+ if (code !== "ENOENT") {
32729
+ return false;
32730
+ }
32731
+ const syscall = findStringInCauseChain(error, "syscall");
32732
+ return syscall?.startsWith("spawn") === true;
32733
+ }
32734
+ function isCancellationError(error, exitCode, pollSignal) {
32735
+ if (exitCode === 130) {
32736
+ return true;
32737
+ }
32738
+ if (!isRecord(error)) {
32739
+ return false;
32740
+ }
32741
+ if (numberField(error, "exitCode") === 130) {
32742
+ return true;
32743
+ }
32744
+ const name = stringField(error, "name");
32745
+ if (name === "ExitPromptError") {
32746
+ return true;
32747
+ }
32748
+ if (name === "AbortError" && pollSignal?.aborted) {
32749
+ return true;
32750
+ }
32751
+ const message = stringField(error, "message");
32752
+ return message?.includes("SIGINT") === true;
32753
+ }
32754
+ function terminalSignalFor(input, outcome) {
32755
+ if (input.recordedFailure?.terminalSignal) {
32756
+ return input.recordedFailure.terminalSignal;
32757
+ }
32758
+ const explicit = findStringInCauseChain(input.error, "terminalSignal") ?? findStringInCauseChain(input.error, "signal");
32759
+ if (explicit) {
32760
+ return explicit;
32761
+ }
32762
+ return outcome === "cancelled" ? "SIGINT" : undefined;
32763
+ }
32764
+ function classifyHttpStatus(status) {
32765
+ if (status === 401 || status === 403) {
32766
+ return "auth";
32767
+ }
32768
+ if (status === 400 || status === 409 || status === 422) {
32769
+ return "validation";
32770
+ }
32771
+ if (status === 408) {
32772
+ return "timeout";
32773
+ }
32774
+ return "network_http";
32775
+ }
32776
+ function classifyFromResult(result) {
32777
+ switch (result) {
32778
+ case "AuthenticationError":
32779
+ return "auth";
32780
+ case "ValidationError":
32781
+ return "validation";
32782
+ case "TimeoutError":
32783
+ return "timeout";
32784
+ default:
32785
+ return;
32786
+ }
32787
+ }
32788
+ function classifyFromErrorCode(errorCode) {
32789
+ if (!errorCode) {
32790
+ return;
32791
+ }
32792
+ if (AUTH_ERROR_CODES.has(errorCode)) {
32793
+ return "auth";
32794
+ }
32795
+ if (VALIDATION_ERROR_CODES.has(errorCode)) {
32796
+ return "validation";
32797
+ }
32798
+ if (TIMEOUT_ERROR_CODES.has(errorCode)) {
32799
+ return "timeout";
32800
+ }
32801
+ if (NETWORK_HTTP_ERROR_CODES.has(errorCode)) {
32802
+ return "network_http";
32803
+ }
32804
+ return;
32805
+ }
32806
+ function classifyFromError(error) {
32807
+ const code = findCodeInCauseChain(error);
32808
+ if (code) {
32809
+ if (code.startsWith("commander.")) {
32810
+ return "validation";
32811
+ }
32812
+ if (NETWORK_OS_ERROR_CODES.has(code) || TLS_ERROR_CODES2.has(code)) {
32813
+ return "network_http";
32814
+ }
32815
+ if (TIMEOUT_OS_ERROR_CODES.has(code)) {
32816
+ return "timeout";
32817
+ }
32818
+ if (MISSING_DEPENDENCY_CODES.has(code) || isSpawnEnoent(error)) {
32819
+ return "missing_dependency";
32820
+ }
32821
+ }
32822
+ const message = stringField(error, "message");
32823
+ if (message?.includes("fetch failed") === true) {
32824
+ return "network_http";
32825
+ }
32826
+ const name = stringField(error, "name");
32827
+ if (name && INTERNAL_ERROR_NAMES.has(name)) {
32828
+ return "internal";
32829
+ }
32830
+ return;
32831
+ }
32832
+ function classifyError(input) {
32833
+ const recorded = input.recordedFailure;
32834
+ if (recorded?.errorClass) {
32835
+ return recorded.errorClass;
32836
+ }
32837
+ const status = recorded?.context?.httpStatus;
32838
+ if (status !== undefined) {
32839
+ return classifyHttpStatus(status);
32840
+ }
32841
+ return classifyFromResult(recorded?.result) ?? classifyFromErrorCode(recorded?.errorCode) ?? classifyFromError(input.error) ?? "unknown";
32842
+ }
32843
+ function recordCommandFailureTelemetry(failure) {
32844
+ recordedFailureSlot.set(failure);
32845
+ }
32846
+ function clearRecordedCommandFailureTelemetry() {
32847
+ recordedFailureSlot.clear();
32848
+ }
32849
+ function takeRecordedCommandFailureTelemetry() {
32850
+ const failure = recordedFailureSlot.get();
32851
+ recordedFailureSlot.clear();
32852
+ return failure;
32853
+ }
32854
+ function buildCommandTerminalTelemetryProperties(input) {
32855
+ const cancelled = isCancellationError(input.error, input.exitCode, input.pollSignal);
32856
+ const outcome = input.recordedFailure?.terminalOutcome ?? (input.exitCode === 0 ? "success" : cancelled ? "cancelled" : "failure");
32857
+ const errorClass = outcome === "success" || outcome === "no_op" ? undefined : outcome === "cancelled" ? "user_cancelled" : classifyError(input);
32858
+ const terminalSignal = terminalSignalFor(input, outcome);
32859
+ return {
32860
+ exit_code: input.exitCode,
32861
+ terminal_outcome: outcome,
32862
+ ...errorClass ? { error_class: errorClass } : {},
32863
+ ...terminalSignal ? { terminal_signal: terminalSignal } : {}
32864
+ };
32865
+ }
32866
+
32649
32867
  // ../common/src/telemetry/telemetry-events.ts
32650
32868
  var CommonTelemetryEvents = {
32651
- Error: "uip.error"
32869
+ Error: "uip.error",
32870
+ ShipSucceeded: "ship_succeeded"
32652
32871
  };
32653
32872
 
32654
32873
  // ../common/src/registry.ts
@@ -32715,6 +32934,136 @@ function formatMessage(category, name, properties) {
32715
32934
  }
32716
32935
  return message;
32717
32936
  }
32937
+ // ../common/src/telemetry/detect-agent.ts
32938
+ var KNOWN_AGENTS = [
32939
+ { envVar: "CLAUDECODE", value: "1", id: "claude-code" },
32940
+ { envVar: "CURSOR_AGENT", value: "1", id: "cursor" },
32941
+ { envVar: "GEMINI_CLI", value: "1", id: "gemini-cli" },
32942
+ { envVar: "CODEX_THREAD_ID", id: "codex" },
32943
+ { envVar: "CODEX_SANDBOX", id: "codex" },
32944
+ { envVar: "AUGMENT_AGENT", value: "1", id: "augment" },
32945
+ { envVar: "CLINE_ACTIVE", value: "true", id: "cline" }
32946
+ ];
32947
+ function detectAgentFromEnv(env) {
32948
+ for (const agent of KNOWN_AGENTS) {
32949
+ const envValue = env[agent.envVar];
32950
+ if (agent.value !== undefined) {
32951
+ if (envValue === agent.value)
32952
+ return agent.id;
32953
+ } else {
32954
+ if (envValue)
32955
+ return agent.id;
32956
+ }
32957
+ }
32958
+ const agentEnv = env.AGENT;
32959
+ if (agentEnv) {
32960
+ if (agentEnv === "1" || agentEnv === "true")
32961
+ return "unknown";
32962
+ if (agentEnv.length <= 32)
32963
+ return agentEnv.toLowerCase();
32964
+ }
32965
+ return;
32966
+ }
32967
+ // ../common/src/telemetry/environment-info.ts
32968
+ var LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
32969
+ // ../common/src/telemetry/execution-context.ts
32970
+ var authSignalSlot = singleton("TelemetryExecutionContextAuthSignal");
32971
+ var isTruthy = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false";
32972
+ var isEqual = (value, expected) => value?.toLowerCase() === expected;
32973
+ var CI_SIGNATURES = [
32974
+ {
32975
+ provider: "github_actions",
32976
+ matches: (env) => isTruthy(env.GITHUB_ACTIONS),
32977
+ isScheduler: (env) => env.GITHUB_EVENT_NAME === "schedule"
32978
+ },
32979
+ {
32980
+ provider: "azure_devops",
32981
+ matches: (env) => isTruthy(env.TF_BUILD),
32982
+ isScheduler: (env) => isEqual(env.BUILD_REASON, "schedule")
32983
+ },
32984
+ {
32985
+ provider: "gitlab",
32986
+ matches: (env) => isTruthy(env.GITLAB_CI),
32987
+ isScheduler: (env) => env.CI_PIPELINE_SOURCE === "schedule"
32988
+ },
32989
+ {
32990
+ provider: "circleci",
32991
+ matches: (env) => isTruthy(env.CIRCLECI),
32992
+ isScheduler: (env) => env.CIRCLE_PIPELINE_TRIGGER_SOURCE === "scheduled_pipeline"
32993
+ },
32994
+ {
32995
+ provider: "jenkins",
32996
+ matches: (env) => isTruthy(env.JENKINS_URL) || isTruthy(env.JENKINS_HOME)
32997
+ },
32998
+ {
32999
+ provider: "teamcity",
33000
+ matches: (env) => isTruthy(env.TEAMCITY_VERSION)
33001
+ },
33002
+ {
33003
+ provider: "buildkite",
33004
+ matches: (env) => isTruthy(env.BUILDKITE),
33005
+ isScheduler: (env) => env.BUILDKITE_SOURCE === "schedule"
33006
+ },
33007
+ {
33008
+ provider: "bitbucket",
33009
+ matches: (env) => isTruthy(env.BITBUCKET_BUILD_NUMBER)
33010
+ },
33011
+ {
33012
+ provider: "travis",
33013
+ matches: (env) => isTruthy(env.TRAVIS)
33014
+ },
33015
+ {
33016
+ provider: "appveyor",
33017
+ matches: (env) => isTruthy(env.APPVEYOR)
33018
+ },
33019
+ {
33020
+ provider: "generic",
33021
+ matches: (env) => isTruthy(env.CI)
33022
+ }
33023
+ ];
33024
+ function currentEnv() {
33025
+ return typeof process === "undefined" ? {} : process.env;
33026
+ }
33027
+ function currentTtyState() {
33028
+ if (typeof process === "undefined")
33029
+ return false;
33030
+ return Boolean(process.stdout?.isTTY || process.stdin?.isTTY || process.stderr?.isTTY);
33031
+ }
33032
+ function detectCi(env) {
33033
+ const signature = CI_SIGNATURES.find((candidate) => candidate.matches(env));
33034
+ if (!signature)
33035
+ return;
33036
+ return {
33037
+ executionContext: signature.isScheduler?.(env) ? "scheduler" : "ci",
33038
+ ciProvider: signature.provider
33039
+ };
33040
+ }
33041
+ function detectExecutionContext(options = {}) {
33042
+ const env = options.env ?? currentEnv();
33043
+ const ci = detectCi(env);
33044
+ if (ci)
33045
+ return ci;
33046
+ const agent = options.agent ?? detectAgentFromEnv(env);
33047
+ if (agent) {
33048
+ return { executionContext: "agent" };
33049
+ }
33050
+ const authSignal = options.authSignal ?? authSignalSlot.get();
33051
+ if (authSignal === "service_account") {
33052
+ return { executionContext: "service_account" };
33053
+ }
33054
+ const isTty = options.isTty ?? currentTtyState();
33055
+ if (isTty) {
33056
+ return { executionContext: "manual" };
33057
+ }
33058
+ return { executionContext: "unknown" };
33059
+ }
33060
+ function getExecutionContextTelemetryProperties() {
33061
+ const detected = detectExecutionContext();
33062
+ return {
33063
+ execution_context: detected.executionContext,
33064
+ ...detected.ciProvider ? { ci_provider: detected.ciProvider } : {}
33065
+ };
33066
+ }
32718
33067
  // ../common/src/telemetry/node-context-storage.ts
32719
33068
  import { AsyncLocalStorage } from "node:async_hooks";
32720
33069
 
@@ -32727,6 +33076,26 @@ class NodeContextStorage {
32727
33076
  return this.storage.getStore();
32728
33077
  }
32729
33078
  }
33079
+ // ../common/src/telemetry/session-id.ts
33080
+ var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
33081
+ var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
33082
+ var telemetrySessionIdSlot = singleton("TelemetrySessionId");
33083
+ function getProcessEnv() {
33084
+ return globalThis.process?.env;
33085
+ }
33086
+ function normalizeSessionId(value) {
33087
+ if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
33088
+ return;
33089
+ }
33090
+ const trimmed = String(value).trim();
33091
+ return trimmed || undefined;
33092
+ }
33093
+ function getConfiguredTelemetrySessionId() {
33094
+ return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
33095
+ }
33096
+ function resolveTelemetrySessionId(existingSessionId) {
33097
+ return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
33098
+ }
32730
33099
  // ../common/src/telemetry/global-telemetry-properties.ts
32731
33100
  var telemetryPropsSlot = singleton("TelemetryDefaultProps");
32732
33101
  function getGlobalTelemetryProperties() {
@@ -32811,12 +33180,22 @@ class TelemetryService {
32811
33180
  return this.contextStorage.getContext();
32812
33181
  }
32813
33182
  enrichPropertiesWithContext(properties, context) {
32814
- return {
32815
- ...getGlobalTelemetryProperties(),
33183
+ const globalProperties = getGlobalTelemetryProperties();
33184
+ const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
33185
+ const sessionId = resolveTelemetrySessionId(existingSessionId);
33186
+ const enriched = {
33187
+ ...getExecutionContextTelemetryProperties(),
33188
+ ...globalProperties,
32816
33189
  ...this.defaultProperties,
32817
33190
  ...properties,
32818
33191
  ...context
32819
33192
  };
33193
+ if (sessionId === undefined) {
33194
+ delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
33195
+ } else {
33196
+ enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
33197
+ }
33198
+ return enriched;
32820
33199
  }
32821
33200
  generateId() {
32822
33201
  return crypto.randomUUID().replaceAll("-", "");
@@ -33286,8 +33665,24 @@ var OutputFormatter;
33286
33665
  data.ErrorCode ??= defaultErrorCodeForFailure(data);
33287
33666
  data.Retry ??= defaultRetryForErrorCode(data.ErrorCode);
33288
33667
  process.exitCode = EXIT_CODES[data.Result] ?? 1;
33289
- const { SuppressTelemetry, ...envelope } = data;
33290
- if (!SuppressTelemetry) {
33668
+ recordCommandFailureTelemetry({
33669
+ result: data.Result,
33670
+ errorCode: data.ErrorCode,
33671
+ retry: data.Retry,
33672
+ message: data.Message,
33673
+ context: data.Context,
33674
+ exitCode: process.exitCode,
33675
+ errorClass: data.TelemetryErrorClass,
33676
+ terminalOutcome: data.TelemetryTerminalOutcome,
33677
+ terminalSignal: data.TelemetryTerminalSignal
33678
+ });
33679
+ const suppressTelemetry = data.SuppressTelemetry === true;
33680
+ const envelope = { ...data };
33681
+ delete envelope.SuppressTelemetry;
33682
+ delete envelope.TelemetryErrorClass;
33683
+ delete envelope.TelemetryTerminalOutcome;
33684
+ delete envelope.TelemetryTerminalSignal;
33685
+ if (!suppressTelemetry) {
33291
33686
  telemetry.trackEvent(CommonTelemetryEvents.Error, {
33292
33687
  result: data.Result,
33293
33688
  errorCode: data.ErrorCode,
@@ -33350,6 +33745,158 @@ var OutputFormatter;
33350
33745
  OutputFormatter.formatToString = formatToString;
33351
33746
  })(OutputFormatter ||= {});
33352
33747
 
33748
+ // ../common/src/telemetry/command-attribution.ts
33749
+ var LEGACY_SKILL_NAMESPACE = "uipath:";
33750
+ var MAX_SKILL_NAME_LENGTH = 80;
33751
+ var SKILL_NAME_PATTERN = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
33752
+ function productMode(productArea, mode) {
33753
+ return { product_area: productArea, mode };
33754
+ }
33755
+ function attributionRecord(groups) {
33756
+ const record = {};
33757
+ for (const [productArea, mode, names] of groups) {
33758
+ const attribution = productMode(productArea, mode);
33759
+ for (const name of names) {
33760
+ record[name] = attribution;
33761
+ }
33762
+ }
33763
+ return record;
33764
+ }
33765
+ function commandAttribution(groups) {
33766
+ const entries = [];
33767
+ for (const [productArea, mode, prefixes] of groups) {
33768
+ const attribution = productMode(productArea, mode);
33769
+ for (const prefix of prefixes) {
33770
+ entries.push({ prefix, attribution });
33771
+ }
33772
+ }
33773
+ return entries;
33774
+ }
33775
+ var SKILL_ATTRIBUTION = attributionRecord([
33776
+ ["admin", "operate", ["uipath-admin"]],
33777
+ ["agents", "build", ["uipath-agents"]],
33778
+ ["api-workflow", "build", ["uipath-api-workflow"]],
33779
+ ["automation-discovery", "build", ["uipath-automation-discovery"]],
33780
+ ["coded-apps", "build", ["uipath-coded-apps"]],
33781
+ ["data-fabric", "operate", ["uipath-data-fabric"]],
33782
+ ["cli", "troubleshoot", ["uipath-feedback"]],
33783
+ ["governance", "operate", ["uipath-governance"]],
33784
+ ["action-center", "build", ["uipath-human-in-the-loop"]],
33785
+ ["document-understanding", "build", ["uipath-ixp"]],
33786
+ [
33787
+ "maestro",
33788
+ "build",
33789
+ ["uipath-maestro-bpmn", "uipath-maestro-case", "uipath-maestro-flow"]
33790
+ ],
33791
+ ["agenthub", "build", ["uipath-mcp-servers"]],
33792
+ ["solution", "build", ["uipath-planner", "uipath-solution"]],
33793
+ ["platform", "operate", ["uipath-platform"]],
33794
+ ["quality", "troubleshoot", ["uipath-review"]],
33795
+ ["rpa", "build", ["uipath-rpa"]],
33796
+ ["cli", "operate", ["uipath-skill-catalog"]],
33797
+ ["action-center", "operate", ["uipath-tasks"]],
33798
+ ["test-manager", "operate", ["uipath-test"]],
33799
+ ["platform", "troubleshoot", ["uipath-troubleshoot"]]
33800
+ ]);
33801
+ var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
33802
+ var COMMAND_ATTRIBUTION = commandAttribution([
33803
+ ["cli", "troubleshoot", ["uip.feedback"]],
33804
+ ["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
33805
+ ["context-grounding", "build", ["uip.context-grounding"]],
33806
+ ["api-workflow", "build", ["uip.api-workflow"]],
33807
+ ["rpa", "build", ["uip.rpa-legacy"]],
33808
+ ["conversational", "operate", ["uip.conversational"]],
33809
+ ["agents", "build", ["uip.codedagent", "uip.agent"]],
33810
+ ["agenthub", "build", ["uip.agenthub"]],
33811
+ ["coded-apps", "build", ["uip.codedapp"]],
33812
+ ["functions", "build", ["uip.functions"]],
33813
+ ["solution", "build", ["uip.solution"]],
33814
+ ["maestro", "build", ["uip.maestro", "uip.case", "uip.flow"]],
33815
+ ["llm-observability", "troubleshoot", ["uip.traces"]],
33816
+ ["platform", "operate", ["uip.platform"]],
33817
+ ["admin", "operate", ["uip.admin"]],
33818
+ ["automation-ops", "operate", ["uip.aops"]],
33819
+ ["documentation", "troubleshoot", ["uip.docsai"]],
33820
+ ["governance", "operate", ["uip.gov"]],
33821
+ ["insights", "operate", ["uip.insights"]],
33822
+ ["document-understanding", "build", ["uip.ixp"]],
33823
+ ["process-mining", "operate", ["uip.pm"]],
33824
+ ["action-center", "operate", ["uip.tasks"]],
33825
+ ["test-manager", "operate", ["uip.tm"]],
33826
+ ["vertical-solutions", "build", ["uip.vss"]],
33827
+ ["data-fabric", "operate", ["uip.df"]],
33828
+ ["integration-service", "build", ["uip.is"]],
33829
+ ["orchestrator", "operate", ["uip.or"]],
33830
+ [
33831
+ "cli",
33832
+ "operate",
33833
+ [
33834
+ "uip.login",
33835
+ "uip.logout",
33836
+ "uip.user",
33837
+ "uip.config",
33838
+ "uip.tools",
33839
+ "uip.skills",
33840
+ "uip.completion",
33841
+ "uip.update",
33842
+ "uip.mcp",
33843
+ "uip.track"
33844
+ ]
33845
+ ]
33846
+ ]).sort((a, b) => b.prefix.length - a.prefix.length);
33847
+ function normalizeCommandPath(value) {
33848
+ if (typeof value !== "string") {
33849
+ return;
33850
+ }
33851
+ const trimmed = value.trim().toLowerCase();
33852
+ if (!trimmed) {
33853
+ return;
33854
+ }
33855
+ const tokens = trimmed.includes(" ") ? trimmed.split(/\s+/).filter((token) => token.length > 0).filter((token) => !token.startsWith("-")) : trimmed.split(".").filter((token) => token.length > 0);
33856
+ if (tokens.length === 0) {
33857
+ return;
33858
+ }
33859
+ const commandTokens = tokens[0] === "uip" ? tokens : ["uip", ...tokens];
33860
+ return commandTokens.join(".");
33861
+ }
33862
+ function getCommandProductModeAttribution(commandPath) {
33863
+ const normalized = normalizeCommandPath(commandPath);
33864
+ if (!normalized) {
33865
+ return;
33866
+ }
33867
+ return COMMAND_ATTRIBUTION.find(({ prefix }) => normalized === prefix || normalized.startsWith(`${prefix}.`))?.attribution;
33868
+ }
33869
+ function normalizeSkillNameWithOptions(value, options) {
33870
+ if (typeof value !== "string") {
33871
+ return;
33872
+ }
33873
+ const normalized = value.trim().toLowerCase();
33874
+ if (!normalized) {
33875
+ return;
33876
+ }
33877
+ const hasLegacyNamespace = normalized.startsWith(LEGACY_SKILL_NAMESPACE);
33878
+ if (hasLegacyNamespace && !options.allowLegacyNamespace) {
33879
+ return;
33880
+ }
33881
+ const skillName = hasLegacyNamespace ? normalized.slice(LEGACY_SKILL_NAMESPACE.length) : normalized;
33882
+ if (skillName.length > MAX_SKILL_NAME_LENGTH || !SKILL_NAME_PATTERN.test(skillName) || !KNOWN_SKILL_NAMES.has(skillName)) {
33883
+ return;
33884
+ }
33885
+ return skillName;
33886
+ }
33887
+ function normalizeSkillName(value) {
33888
+ return normalizeSkillNameWithOptions(value, {
33889
+ allowLegacyNamespace: false
33890
+ });
33891
+ }
33892
+ function buildCommandTelemetryAttribution(commandPath, skillSource) {
33893
+ const skillName = normalizeSkillName(skillSource);
33894
+ return {
33895
+ ...skillName ? { skill_name: skillName } : {},
33896
+ ...getCommandProductModeAttribution(commandPath)
33897
+ };
33898
+ }
33899
+
33353
33900
  // ../common/src/telemetry/pii-redactor.ts
33354
33901
  var REDACTED = "[REDACTED]";
33355
33902
  var MAX_VALUE_LENGTH = 200;
@@ -33535,6 +34082,12 @@ function commandHelpHint(commandPath) {
33535
34082
  const command = commandPath.replace(/\./g, " ");
33536
34083
  return `An unexpected error occurred. Run '${command} --help' to verify command syntax, or run with --log-level debug for details.`;
33537
34084
  }
34085
+ function isPromptCancellation(error) {
34086
+ return error instanceof Error && error.name === "ExitPromptError";
34087
+ }
34088
+ function exitCodeFromProcess(fallback) {
34089
+ return typeof process.exitCode === "number" ? process.exitCode : fallback;
34090
+ }
33538
34091
  Command.prototype.trackedAction = function(context, fn, properties) {
33539
34092
  const command = this;
33540
34093
  return this.action(async (...args) => {
@@ -33542,6 +34095,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
33542
34095
  const props = typeof properties === "function" ? properties(...args) : properties;
33543
34096
  const startTime = performance.now();
33544
34097
  let errorMessage;
34098
+ let fallbackExitCode = EXIT_CODES.Success;
34099
+ clearRecordedCommandFailureTelemetry();
33545
34100
  const [error] = await catchError(fn(...args));
33546
34101
  if (error) {
33547
34102
  errorMessage = error instanceof Error ? error.message : String(error);
@@ -33556,6 +34111,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
33556
34111
  const customRetry = isRetryHint(typedRetry) ? typedRetry : undefined;
33557
34112
  const typedContext = typed.context ?? typed.Context;
33558
34113
  const customContext = isErrorContext(typedContext) ? typedContext : undefined;
34114
+ const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation(error) ? 130 : undefined;
34115
+ fallbackExitCode = cancellationExitCode ?? EXIT_CODES[finalResult];
33559
34116
  OutputFormatter.error({
33560
34117
  Result: finalResult,
33561
34118
  ...customErrorCode ? { ErrorCode: customErrorCode } : {},
@@ -33564,16 +34121,26 @@ Command.prototype.trackedAction = function(context, fn, properties) {
33564
34121
  ...customRetry ? { Retry: customRetry } : {},
33565
34122
  ...customContext ? { Context: customContext } : {}
33566
34123
  });
33567
- context.exit(EXIT_CODES[finalResult]);
34124
+ context.exit(fallbackExitCode);
33568
34125
  }
33569
34126
  const durationMs = performance.now() - startTime;
33570
- const success = !error && (process.exitCode === undefined || process.exitCode === 0);
34127
+ const exitCode = fallbackExitCode === 130 ? fallbackExitCode : exitCodeFromProcess(fallbackExitCode);
34128
+ const recordedFailure = takeRecordedCommandFailureTelemetry();
34129
+ const success = !error && exitCode === 0;
34130
+ const terminalTelemetry = buildCommandTerminalTelemetryProperties({
34131
+ error,
34132
+ exitCode,
34133
+ recordedFailure,
34134
+ pollSignal: context.pollSignal
34135
+ });
33571
34136
  telemetry.trackEvent(telemetryName, redactProperties({
33572
34137
  ...extractCommandParams(command),
33573
34138
  ...props,
34139
+ ...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
33574
34140
  command: "true",
33575
34141
  duration: String(durationMs),
33576
34142
  success: String(success),
34143
+ ...terminalTelemetry,
33577
34144
  ...errorMessage ? { errorMessage } : {}
33578
34145
  }));
33579
34146
  });
@@ -33655,6 +34222,8 @@ var ScreenLogger;
33655
34222
  })(ScreenLogger ||= {});
33656
34223
  // ../common/src/sdk-user-agent.ts
33657
34224
  var sdkUserAgentHostToken = singleton("SdkUserAgentHostToken");
34225
+ // ../common/src/telemetry/ship-succeeded.ts
34226
+ var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
33658
34227
  // ../common/src/tool-provider.ts
33659
34228
  var factorySlot = singleton("PackagerFactoryProvider");
33660
34229
  // src/commands/add.ts
@@ -60486,7 +61055,7 @@ function validateConfig(config3) {
60486
61055
  function isCompleteConfig(config3) {
60487
61056
  return hasRequiredBaseFields(config3) && hasValidAuthConfig(config3);
60488
61057
  }
60489
- function normalizeBaseUrl(url2) {
61058
+ function normalizeBaseUrl2(url2) {
60490
61059
  return url2.endsWith("/") ? url2.slice(0, -1) : url2;
60491
61060
  }
60492
61061
  var REGISTRY_KEY2 = Symbol.for("@uipath/sdk-internals-registry");
@@ -60660,7 +61229,7 @@ _UiPath_config = new WeakMap, _UiPath_authService = new WeakMap, _UiPath_initial
60660
61229
  const hasSecretAuth = hasSecretConfig(config3);
60661
61230
  const hasOAuthAuth = hasOAuthConfig(config3);
60662
61231
  const internalConfig = new UiPathConfig({
60663
- baseUrl: normalizeBaseUrl(config3.baseUrl),
61232
+ baseUrl: normalizeBaseUrl2(config3.baseUrl),
60664
61233
  orgName: config3.orgName,
60665
61234
  tenantName: config3.tenantName,
60666
61235
  secret: hasSecretAuth ? config3.secret : undefined,
@@ -65897,4 +66466,4 @@ export {
65897
66466
  metadata
65898
66467
  };
65899
66468
 
65900
- //# debugId=9B84488A4F53121664756E2164756E21
66469
+ //# debugId=0A9A929B9B03F28D64756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/vertical-solutions-tool",
3
3
  "license": "MIT",
4
- "version": "1.197.0-preview.64",
4
+ "version": "1.197.0-preview.66",
5
5
  "description": "Scaffold and generate Vertical Solution projects.",
6
6
  "private": false,
7
7
  "repository": {
@@ -34,5 +34,5 @@
34
34
  "files": [
35
35
  "dist"
36
36
  ],
37
- "gitHead": "3977b977945bf519336258da69fd271433eaaef4"
37
+ "gitHead": "386b0837882b19062bf744c74949cdf9c5e48dea"
38
38
  }