@uipath/ixp-tool 1.197.0-preview.65 → 1.197.0-preview.67

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 (3) hide show
  1. package/dist/index.js +2 -2
  2. package/dist/tool.js +580 -11
  3. package/package.json +28 -36
package/dist/index.js CHANGED
@@ -2146,7 +2146,7 @@ var {
2146
2146
  var package_default = {
2147
2147
  name: "@uipath/ixp-tool",
2148
2148
  license: "MIT",
2149
- version: "1.197.0-preview.65",
2149
+ version: "1.197.0-preview.67",
2150
2150
  description: "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
2151
2151
  private: false,
2152
2152
  repository: {
@@ -2196,4 +2196,4 @@ program2.name("ixp-tool").description("UiPath IXP Tool - Standalone CLI").versio
2196
2196
  await registerCommands(program2);
2197
2197
  program2.parse(process.argv);
2198
2198
 
2199
- //# debugId=78494B3E8C601D7164756E2164756E21
2199
+ //# debugId=90C36814346AA50F64756E2164756E21
package/dist/tool.js CHANGED
@@ -3030,7 +3030,7 @@ function isBrowser() {
3030
3030
 
3031
3031
  // ../../node_modules/@uipath/coreipc/index.js
3032
3032
  var require_coreipc = __commonJS((exports, module) => {
3033
- var __dirname = "/Users/alexandru.oltean/github/cli/node_modules/@uipath/coreipc";
3033
+ var __dirname = "/home/runner/work/cli/cli/node_modules/@uipath/coreipc";
3034
3034
  /*! For license information please see index.js.LICENSE.txt */
3035
3035
  (function(e, t) {
3036
3036
  typeof exports == "object" && typeof module == "object" ? module.exports = t() : typeof define == "function" && define.amd ? define([], t) : typeof exports == "object" ? exports.ipc = t() : e.ipc = t();
@@ -21230,7 +21230,7 @@ var init_server = __esm(() => {
21230
21230
  var package_default = {
21231
21231
  name: "@uipath/ixp-tool",
21232
21232
  license: "MIT",
21233
- version: "1.197.0-preview.65",
21233
+ version: "1.197.0-preview.67",
21234
21234
  description: "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
21235
21235
  private: false,
21236
21236
  repository: {
@@ -26593,9 +26593,228 @@ function getOutputFilter() {
26593
26593
  return filterSlot.get();
26594
26594
  }
26595
26595
 
26596
+ // ../common/src/telemetry/command-terminal.ts
26597
+ var recordedFailureSlot = singleton("CommandTelemetryFailure");
26598
+ var AUTH_ERROR_CODES = new Set([
26599
+ "authentication_required",
26600
+ "permission_denied"
26601
+ ]);
26602
+ var VALIDATION_ERROR_CODES = new Set(["invalid_argument"]);
26603
+ var NETWORK_HTTP_ERROR_CODES = new Set([
26604
+ "network_error",
26605
+ "rate_limited",
26606
+ "server_error",
26607
+ "not_found",
26608
+ "method_not_allowed"
26609
+ ]);
26610
+ var TIMEOUT_ERROR_CODES = new Set(["timeout"]);
26611
+ var NETWORK_OS_ERROR_CODES = new Set([
26612
+ "ECONNREFUSED",
26613
+ "ECONNRESET",
26614
+ "ENOTFOUND",
26615
+ "EAI_AGAIN",
26616
+ "EPIPE",
26617
+ "EHOSTUNREACH",
26618
+ "ENETUNREACH",
26619
+ "EAI_FAIL"
26620
+ ]);
26621
+ var TIMEOUT_OS_ERROR_CODES = new Set(["ETIMEDOUT", "ESOCKETTIMEDOUT"]);
26622
+ var TLS_ERROR_CODES2 = new Set([
26623
+ "SELF_SIGNED_CERT_IN_CHAIN",
26624
+ "DEPTH_ZERO_SELF_SIGNED_CERT",
26625
+ "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
26626
+ "UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
26627
+ "UNABLE_TO_GET_ISSUER_CERT",
26628
+ "CERT_HAS_EXPIRED",
26629
+ "CERT_UNTRUSTED",
26630
+ "ERR_TLS_CERT_ALTNAME_INVALID"
26631
+ ]);
26632
+ var MISSING_DEPENDENCY_CODES = new Set([
26633
+ "MODULE_NOT_FOUND",
26634
+ "ERR_MODULE_NOT_FOUND"
26635
+ ]);
26636
+ var INTERNAL_ERROR_NAMES = new Set([
26637
+ "TypeError",
26638
+ "ReferenceError",
26639
+ "SyntaxError",
26640
+ "RangeError"
26641
+ ]);
26642
+ function isRecord(value) {
26643
+ return value !== null && typeof value === "object";
26644
+ }
26645
+ function stringField(value, field) {
26646
+ if (!isRecord(value)) {
26647
+ return;
26648
+ }
26649
+ const raw = value[field];
26650
+ return typeof raw === "string" ? raw : undefined;
26651
+ }
26652
+ function numberField(value, field) {
26653
+ if (!isRecord(value)) {
26654
+ return;
26655
+ }
26656
+ const raw = value[field];
26657
+ return typeof raw === "number" ? raw : undefined;
26658
+ }
26659
+ function findStringInCauseChain(error, field) {
26660
+ let current = error;
26661
+ for (let depth = 0;depth < 5 && current !== null && typeof current === "object"; depth++) {
26662
+ const value = stringField(current, field);
26663
+ if (value) {
26664
+ return value;
26665
+ }
26666
+ current = current.cause;
26667
+ }
26668
+ return;
26669
+ }
26670
+ function findCodeInCauseChain(error) {
26671
+ return findStringInCauseChain(error, "code");
26672
+ }
26673
+ function isSpawnEnoent(error) {
26674
+ const code = findCodeInCauseChain(error);
26675
+ if (code !== "ENOENT") {
26676
+ return false;
26677
+ }
26678
+ const syscall = findStringInCauseChain(error, "syscall");
26679
+ return syscall?.startsWith("spawn") === true;
26680
+ }
26681
+ function isCancellationError(error, exitCode, pollSignal) {
26682
+ if (exitCode === 130) {
26683
+ return true;
26684
+ }
26685
+ if (!isRecord(error)) {
26686
+ return false;
26687
+ }
26688
+ if (numberField(error, "exitCode") === 130) {
26689
+ return true;
26690
+ }
26691
+ const name = stringField(error, "name");
26692
+ if (name === "ExitPromptError") {
26693
+ return true;
26694
+ }
26695
+ if (name === "AbortError" && pollSignal?.aborted) {
26696
+ return true;
26697
+ }
26698
+ const message = stringField(error, "message");
26699
+ return message?.includes("SIGINT") === true;
26700
+ }
26701
+ function terminalSignalFor(input, outcome) {
26702
+ if (input.recordedFailure?.terminalSignal) {
26703
+ return input.recordedFailure.terminalSignal;
26704
+ }
26705
+ const explicit = findStringInCauseChain(input.error, "terminalSignal") ?? findStringInCauseChain(input.error, "signal");
26706
+ if (explicit) {
26707
+ return explicit;
26708
+ }
26709
+ return outcome === "cancelled" ? "SIGINT" : undefined;
26710
+ }
26711
+ function classifyHttpStatus(status) {
26712
+ if (status === 401 || status === 403) {
26713
+ return "auth";
26714
+ }
26715
+ if (status === 400 || status === 409 || status === 422) {
26716
+ return "validation";
26717
+ }
26718
+ if (status === 408) {
26719
+ return "timeout";
26720
+ }
26721
+ return "network_http";
26722
+ }
26723
+ function classifyFromResult(result) {
26724
+ switch (result) {
26725
+ case "AuthenticationError":
26726
+ return "auth";
26727
+ case "ValidationError":
26728
+ return "validation";
26729
+ case "TimeoutError":
26730
+ return "timeout";
26731
+ default:
26732
+ return;
26733
+ }
26734
+ }
26735
+ function classifyFromErrorCode(errorCode) {
26736
+ if (!errorCode) {
26737
+ return;
26738
+ }
26739
+ if (AUTH_ERROR_CODES.has(errorCode)) {
26740
+ return "auth";
26741
+ }
26742
+ if (VALIDATION_ERROR_CODES.has(errorCode)) {
26743
+ return "validation";
26744
+ }
26745
+ if (TIMEOUT_ERROR_CODES.has(errorCode)) {
26746
+ return "timeout";
26747
+ }
26748
+ if (NETWORK_HTTP_ERROR_CODES.has(errorCode)) {
26749
+ return "network_http";
26750
+ }
26751
+ return;
26752
+ }
26753
+ function classifyFromError(error) {
26754
+ const code = findCodeInCauseChain(error);
26755
+ if (code) {
26756
+ if (code.startsWith("commander.")) {
26757
+ return "validation";
26758
+ }
26759
+ if (NETWORK_OS_ERROR_CODES.has(code) || TLS_ERROR_CODES2.has(code)) {
26760
+ return "network_http";
26761
+ }
26762
+ if (TIMEOUT_OS_ERROR_CODES.has(code)) {
26763
+ return "timeout";
26764
+ }
26765
+ if (MISSING_DEPENDENCY_CODES.has(code) || isSpawnEnoent(error)) {
26766
+ return "missing_dependency";
26767
+ }
26768
+ }
26769
+ const message = stringField(error, "message");
26770
+ if (message?.includes("fetch failed") === true) {
26771
+ return "network_http";
26772
+ }
26773
+ const name = stringField(error, "name");
26774
+ if (name && INTERNAL_ERROR_NAMES.has(name)) {
26775
+ return "internal";
26776
+ }
26777
+ return;
26778
+ }
26779
+ function classifyError2(input) {
26780
+ const recorded = input.recordedFailure;
26781
+ if (recorded?.errorClass) {
26782
+ return recorded.errorClass;
26783
+ }
26784
+ const status = recorded?.context?.httpStatus;
26785
+ if (status !== undefined) {
26786
+ return classifyHttpStatus(status);
26787
+ }
26788
+ return classifyFromResult(recorded?.result) ?? classifyFromErrorCode(recorded?.errorCode) ?? classifyFromError(input.error) ?? "unknown";
26789
+ }
26790
+ function recordCommandFailureTelemetry(failure) {
26791
+ recordedFailureSlot.set(failure);
26792
+ }
26793
+ function clearRecordedCommandFailureTelemetry() {
26794
+ recordedFailureSlot.clear();
26795
+ }
26796
+ function takeRecordedCommandFailureTelemetry() {
26797
+ const failure = recordedFailureSlot.get();
26798
+ recordedFailureSlot.clear();
26799
+ return failure;
26800
+ }
26801
+ function buildCommandTerminalTelemetryProperties(input) {
26802
+ const cancelled = isCancellationError(input.error, input.exitCode, input.pollSignal);
26803
+ const outcome = input.recordedFailure?.terminalOutcome ?? (input.exitCode === 0 ? "success" : cancelled ? "cancelled" : "failure");
26804
+ const errorClass = outcome === "success" || outcome === "no_op" ? undefined : outcome === "cancelled" ? "user_cancelled" : classifyError2(input);
26805
+ const terminalSignal = terminalSignalFor(input, outcome);
26806
+ return {
26807
+ exit_code: input.exitCode,
26808
+ terminal_outcome: outcome,
26809
+ ...errorClass ? { error_class: errorClass } : {},
26810
+ ...terminalSignal ? { terminal_signal: terminalSignal } : {}
26811
+ };
26812
+ }
26813
+
26596
26814
  // ../common/src/telemetry/telemetry-events.ts
26597
26815
  var CommonTelemetryEvents = {
26598
- Error: "uip.error"
26816
+ Error: "uip.error",
26817
+ ShipSucceeded: "ship_succeeded"
26599
26818
  };
26600
26819
 
26601
26820
  // ../common/src/registry.ts
@@ -26662,6 +26881,136 @@ function formatMessage(category, name, properties) {
26662
26881
  }
26663
26882
  return message;
26664
26883
  }
26884
+ // ../common/src/telemetry/detect-agent.ts
26885
+ var KNOWN_AGENTS = [
26886
+ { envVar: "CLAUDECODE", value: "1", id: "claude-code" },
26887
+ { envVar: "CURSOR_AGENT", value: "1", id: "cursor" },
26888
+ { envVar: "GEMINI_CLI", value: "1", id: "gemini-cli" },
26889
+ { envVar: "CODEX_THREAD_ID", id: "codex" },
26890
+ { envVar: "CODEX_SANDBOX", id: "codex" },
26891
+ { envVar: "AUGMENT_AGENT", value: "1", id: "augment" },
26892
+ { envVar: "CLINE_ACTIVE", value: "true", id: "cline" }
26893
+ ];
26894
+ function detectAgentFromEnv(env) {
26895
+ for (const agent of KNOWN_AGENTS) {
26896
+ const envValue = env[agent.envVar];
26897
+ if (agent.value !== undefined) {
26898
+ if (envValue === agent.value)
26899
+ return agent.id;
26900
+ } else {
26901
+ if (envValue)
26902
+ return agent.id;
26903
+ }
26904
+ }
26905
+ const agentEnv = env.AGENT;
26906
+ if (agentEnv) {
26907
+ if (agentEnv === "1" || agentEnv === "true")
26908
+ return "unknown";
26909
+ if (agentEnv.length <= 32)
26910
+ return agentEnv.toLowerCase();
26911
+ }
26912
+ return;
26913
+ }
26914
+ // ../common/src/telemetry/environment-info.ts
26915
+ var LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
26916
+ // ../common/src/telemetry/execution-context.ts
26917
+ var authSignalSlot = singleton("TelemetryExecutionContextAuthSignal");
26918
+ var isTruthy = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false";
26919
+ var isEqual = (value, expected) => value?.toLowerCase() === expected;
26920
+ var CI_SIGNATURES = [
26921
+ {
26922
+ provider: "github_actions",
26923
+ matches: (env) => isTruthy(env.GITHUB_ACTIONS),
26924
+ isScheduler: (env) => env.GITHUB_EVENT_NAME === "schedule"
26925
+ },
26926
+ {
26927
+ provider: "azure_devops",
26928
+ matches: (env) => isTruthy(env.TF_BUILD),
26929
+ isScheduler: (env) => isEqual(env.BUILD_REASON, "schedule")
26930
+ },
26931
+ {
26932
+ provider: "gitlab",
26933
+ matches: (env) => isTruthy(env.GITLAB_CI),
26934
+ isScheduler: (env) => env.CI_PIPELINE_SOURCE === "schedule"
26935
+ },
26936
+ {
26937
+ provider: "circleci",
26938
+ matches: (env) => isTruthy(env.CIRCLECI),
26939
+ isScheduler: (env) => env.CIRCLE_PIPELINE_TRIGGER_SOURCE === "scheduled_pipeline"
26940
+ },
26941
+ {
26942
+ provider: "jenkins",
26943
+ matches: (env) => isTruthy(env.JENKINS_URL) || isTruthy(env.JENKINS_HOME)
26944
+ },
26945
+ {
26946
+ provider: "teamcity",
26947
+ matches: (env) => isTruthy(env.TEAMCITY_VERSION)
26948
+ },
26949
+ {
26950
+ provider: "buildkite",
26951
+ matches: (env) => isTruthy(env.BUILDKITE),
26952
+ isScheduler: (env) => env.BUILDKITE_SOURCE === "schedule"
26953
+ },
26954
+ {
26955
+ provider: "bitbucket",
26956
+ matches: (env) => isTruthy(env.BITBUCKET_BUILD_NUMBER)
26957
+ },
26958
+ {
26959
+ provider: "travis",
26960
+ matches: (env) => isTruthy(env.TRAVIS)
26961
+ },
26962
+ {
26963
+ provider: "appveyor",
26964
+ matches: (env) => isTruthy(env.APPVEYOR)
26965
+ },
26966
+ {
26967
+ provider: "generic",
26968
+ matches: (env) => isTruthy(env.CI)
26969
+ }
26970
+ ];
26971
+ function currentEnv() {
26972
+ return typeof process === "undefined" ? {} : process.env;
26973
+ }
26974
+ function currentTtyState() {
26975
+ if (typeof process === "undefined")
26976
+ return false;
26977
+ return Boolean(process.stdout?.isTTY || process.stdin?.isTTY || process.stderr?.isTTY);
26978
+ }
26979
+ function detectCi(env) {
26980
+ const signature = CI_SIGNATURES.find((candidate) => candidate.matches(env));
26981
+ if (!signature)
26982
+ return;
26983
+ return {
26984
+ executionContext: signature.isScheduler?.(env) ? "scheduler" : "ci",
26985
+ ciProvider: signature.provider
26986
+ };
26987
+ }
26988
+ function detectExecutionContext(options = {}) {
26989
+ const env = options.env ?? currentEnv();
26990
+ const ci = detectCi(env);
26991
+ if (ci)
26992
+ return ci;
26993
+ const agent = options.agent ?? detectAgentFromEnv(env);
26994
+ if (agent) {
26995
+ return { executionContext: "agent" };
26996
+ }
26997
+ const authSignal = options.authSignal ?? authSignalSlot.get();
26998
+ if (authSignal === "service_account") {
26999
+ return { executionContext: "service_account" };
27000
+ }
27001
+ const isTty = options.isTty ?? currentTtyState();
27002
+ if (isTty) {
27003
+ return { executionContext: "manual" };
27004
+ }
27005
+ return { executionContext: "unknown" };
27006
+ }
27007
+ function getExecutionContextTelemetryProperties() {
27008
+ const detected = detectExecutionContext();
27009
+ return {
27010
+ execution_context: detected.executionContext,
27011
+ ...detected.ciProvider ? { ci_provider: detected.ciProvider } : {}
27012
+ };
27013
+ }
26665
27014
  // ../common/src/telemetry/node-context-storage.ts
26666
27015
  import { AsyncLocalStorage } from "node:async_hooks";
26667
27016
 
@@ -26674,6 +27023,26 @@ class NodeContextStorage {
26674
27023
  return this.storage.getStore();
26675
27024
  }
26676
27025
  }
27026
+ // ../common/src/telemetry/session-id.ts
27027
+ var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
27028
+ var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
27029
+ var telemetrySessionIdSlot = singleton("TelemetrySessionId");
27030
+ function getProcessEnv() {
27031
+ return globalThis.process?.env;
27032
+ }
27033
+ function normalizeSessionId(value) {
27034
+ if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
27035
+ return;
27036
+ }
27037
+ const trimmed = String(value).trim();
27038
+ return trimmed || undefined;
27039
+ }
27040
+ function getConfiguredTelemetrySessionId() {
27041
+ return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
27042
+ }
27043
+ function resolveTelemetrySessionId(existingSessionId) {
27044
+ return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
27045
+ }
26677
27046
  // ../common/src/telemetry/global-telemetry-properties.ts
26678
27047
  var telemetryPropsSlot = singleton("TelemetryDefaultProps");
26679
27048
  function getGlobalTelemetryProperties() {
@@ -26758,12 +27127,22 @@ class TelemetryService {
26758
27127
  return this.contextStorage.getContext();
26759
27128
  }
26760
27129
  enrichPropertiesWithContext(properties, context) {
26761
- return {
26762
- ...getGlobalTelemetryProperties(),
27130
+ const globalProperties = getGlobalTelemetryProperties();
27131
+ const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
27132
+ const sessionId = resolveTelemetrySessionId(existingSessionId);
27133
+ const enriched = {
27134
+ ...getExecutionContextTelemetryProperties(),
27135
+ ...globalProperties,
26763
27136
  ...this.defaultProperties,
26764
27137
  ...properties,
26765
27138
  ...context
26766
27139
  };
27140
+ if (sessionId === undefined) {
27141
+ delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
27142
+ } else {
27143
+ enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
27144
+ }
27145
+ return enriched;
26767
27146
  }
26768
27147
  generateId() {
26769
27148
  return crypto.randomUUID().replaceAll("-", "");
@@ -27233,8 +27612,24 @@ var OutputFormatter;
27233
27612
  data.ErrorCode ??= defaultErrorCodeForFailure(data);
27234
27613
  data.Retry ??= defaultRetryForErrorCode(data.ErrorCode);
27235
27614
  process.exitCode = EXIT_CODES[data.Result] ?? 1;
27236
- const { SuppressTelemetry, ...envelope } = data;
27237
- if (!SuppressTelemetry) {
27615
+ recordCommandFailureTelemetry({
27616
+ result: data.Result,
27617
+ errorCode: data.ErrorCode,
27618
+ retry: data.Retry,
27619
+ message: data.Message,
27620
+ context: data.Context,
27621
+ exitCode: process.exitCode,
27622
+ errorClass: data.TelemetryErrorClass,
27623
+ terminalOutcome: data.TelemetryTerminalOutcome,
27624
+ terminalSignal: data.TelemetryTerminalSignal
27625
+ });
27626
+ const suppressTelemetry = data.SuppressTelemetry === true;
27627
+ const envelope = { ...data };
27628
+ delete envelope.SuppressTelemetry;
27629
+ delete envelope.TelemetryErrorClass;
27630
+ delete envelope.TelemetryTerminalOutcome;
27631
+ delete envelope.TelemetryTerminalSignal;
27632
+ if (!suppressTelemetry) {
27238
27633
  telemetry.trackEvent(CommonTelemetryEvents.Error, {
27239
27634
  result: data.Result,
27240
27635
  errorCode: data.ErrorCode,
@@ -27297,6 +27692,158 @@ var OutputFormatter;
27297
27692
  OutputFormatter.formatToString = formatToString;
27298
27693
  })(OutputFormatter ||= {});
27299
27694
 
27695
+ // ../common/src/telemetry/command-attribution.ts
27696
+ var LEGACY_SKILL_NAMESPACE = "uipath:";
27697
+ var MAX_SKILL_NAME_LENGTH = 80;
27698
+ var SKILL_NAME_PATTERN = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
27699
+ function productMode(productArea, mode) {
27700
+ return { product_area: productArea, mode };
27701
+ }
27702
+ function attributionRecord(groups) {
27703
+ const record = {};
27704
+ for (const [productArea, mode, names] of groups) {
27705
+ const attribution = productMode(productArea, mode);
27706
+ for (const name of names) {
27707
+ record[name] = attribution;
27708
+ }
27709
+ }
27710
+ return record;
27711
+ }
27712
+ function commandAttribution(groups) {
27713
+ const entries = [];
27714
+ for (const [productArea, mode, prefixes] of groups) {
27715
+ const attribution = productMode(productArea, mode);
27716
+ for (const prefix of prefixes) {
27717
+ entries.push({ prefix, attribution });
27718
+ }
27719
+ }
27720
+ return entries;
27721
+ }
27722
+ var SKILL_ATTRIBUTION = attributionRecord([
27723
+ ["admin", "operate", ["uipath-admin"]],
27724
+ ["agents", "build", ["uipath-agents"]],
27725
+ ["api-workflow", "build", ["uipath-api-workflow"]],
27726
+ ["automation-discovery", "build", ["uipath-automation-discovery"]],
27727
+ ["coded-apps", "build", ["uipath-coded-apps"]],
27728
+ ["data-fabric", "operate", ["uipath-data-fabric"]],
27729
+ ["cli", "troubleshoot", ["uipath-feedback"]],
27730
+ ["governance", "operate", ["uipath-governance"]],
27731
+ ["action-center", "build", ["uipath-human-in-the-loop"]],
27732
+ ["document-understanding", "build", ["uipath-ixp"]],
27733
+ [
27734
+ "maestro",
27735
+ "build",
27736
+ ["uipath-maestro-bpmn", "uipath-maestro-case", "uipath-maestro-flow"]
27737
+ ],
27738
+ ["agenthub", "build", ["uipath-mcp-servers"]],
27739
+ ["solution", "build", ["uipath-planner", "uipath-solution"]],
27740
+ ["platform", "operate", ["uipath-platform"]],
27741
+ ["quality", "troubleshoot", ["uipath-review"]],
27742
+ ["rpa", "build", ["uipath-rpa"]],
27743
+ ["cli", "operate", ["uipath-skill-catalog"]],
27744
+ ["action-center", "operate", ["uipath-tasks"]],
27745
+ ["test-manager", "operate", ["uipath-test"]],
27746
+ ["platform", "troubleshoot", ["uipath-troubleshoot"]]
27747
+ ]);
27748
+ var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
27749
+ var COMMAND_ATTRIBUTION = commandAttribution([
27750
+ ["cli", "troubleshoot", ["uip.feedback"]],
27751
+ ["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
27752
+ ["context-grounding", "build", ["uip.context-grounding"]],
27753
+ ["api-workflow", "build", ["uip.api-workflow"]],
27754
+ ["rpa", "build", ["uip.rpa-legacy"]],
27755
+ ["conversational", "operate", ["uip.conversational"]],
27756
+ ["agents", "build", ["uip.codedagent", "uip.agent"]],
27757
+ ["agenthub", "build", ["uip.agenthub"]],
27758
+ ["coded-apps", "build", ["uip.codedapp"]],
27759
+ ["functions", "build", ["uip.functions"]],
27760
+ ["solution", "build", ["uip.solution"]],
27761
+ ["maestro", "build", ["uip.maestro", "uip.case", "uip.flow"]],
27762
+ ["llm-observability", "troubleshoot", ["uip.traces"]],
27763
+ ["platform", "operate", ["uip.platform"]],
27764
+ ["admin", "operate", ["uip.admin"]],
27765
+ ["automation-ops", "operate", ["uip.aops"]],
27766
+ ["documentation", "troubleshoot", ["uip.docsai"]],
27767
+ ["governance", "operate", ["uip.gov"]],
27768
+ ["insights", "operate", ["uip.insights"]],
27769
+ ["document-understanding", "build", ["uip.ixp"]],
27770
+ ["process-mining", "operate", ["uip.pm"]],
27771
+ ["action-center", "operate", ["uip.tasks"]],
27772
+ ["test-manager", "operate", ["uip.tm"]],
27773
+ ["vertical-solutions", "build", ["uip.vss"]],
27774
+ ["data-fabric", "operate", ["uip.df"]],
27775
+ ["integration-service", "build", ["uip.is"]],
27776
+ ["orchestrator", "operate", ["uip.or"]],
27777
+ [
27778
+ "cli",
27779
+ "operate",
27780
+ [
27781
+ "uip.login",
27782
+ "uip.logout",
27783
+ "uip.user",
27784
+ "uip.config",
27785
+ "uip.tools",
27786
+ "uip.skills",
27787
+ "uip.completion",
27788
+ "uip.update",
27789
+ "uip.mcp",
27790
+ "uip.track"
27791
+ ]
27792
+ ]
27793
+ ]).sort((a, b) => b.prefix.length - a.prefix.length);
27794
+ function normalizeCommandPath(value) {
27795
+ if (typeof value !== "string") {
27796
+ return;
27797
+ }
27798
+ const trimmed = value.trim().toLowerCase();
27799
+ if (!trimmed) {
27800
+ return;
27801
+ }
27802
+ const tokens = trimmed.includes(" ") ? trimmed.split(/\s+/).filter((token) => token.length > 0).filter((token) => !token.startsWith("-")) : trimmed.split(".").filter((token) => token.length > 0);
27803
+ if (tokens.length === 0) {
27804
+ return;
27805
+ }
27806
+ const commandTokens = tokens[0] === "uip" ? tokens : ["uip", ...tokens];
27807
+ return commandTokens.join(".");
27808
+ }
27809
+ function getCommandProductModeAttribution(commandPath) {
27810
+ const normalized = normalizeCommandPath(commandPath);
27811
+ if (!normalized) {
27812
+ return;
27813
+ }
27814
+ return COMMAND_ATTRIBUTION.find(({ prefix }) => normalized === prefix || normalized.startsWith(`${prefix}.`))?.attribution;
27815
+ }
27816
+ function normalizeSkillNameWithOptions(value, options) {
27817
+ if (typeof value !== "string") {
27818
+ return;
27819
+ }
27820
+ const normalized = value.trim().toLowerCase();
27821
+ if (!normalized) {
27822
+ return;
27823
+ }
27824
+ const hasLegacyNamespace = normalized.startsWith(LEGACY_SKILL_NAMESPACE);
27825
+ if (hasLegacyNamespace && !options.allowLegacyNamespace) {
27826
+ return;
27827
+ }
27828
+ const skillName = hasLegacyNamespace ? normalized.slice(LEGACY_SKILL_NAMESPACE.length) : normalized;
27829
+ if (skillName.length > MAX_SKILL_NAME_LENGTH || !SKILL_NAME_PATTERN.test(skillName) || !KNOWN_SKILL_NAMES.has(skillName)) {
27830
+ return;
27831
+ }
27832
+ return skillName;
27833
+ }
27834
+ function normalizeSkillName(value) {
27835
+ return normalizeSkillNameWithOptions(value, {
27836
+ allowLegacyNamespace: false
27837
+ });
27838
+ }
27839
+ function buildCommandTelemetryAttribution(commandPath, skillSource) {
27840
+ const skillName = normalizeSkillName(skillSource);
27841
+ return {
27842
+ ...skillName ? { skill_name: skillName } : {},
27843
+ ...getCommandProductModeAttribution(commandPath)
27844
+ };
27845
+ }
27846
+
27300
27847
  // ../common/src/telemetry/pii-redactor.ts
27301
27848
  var REDACTED = "[REDACTED]";
27302
27849
  var MAX_VALUE_LENGTH = 200;
@@ -27482,6 +28029,12 @@ function commandHelpHint(commandPath) {
27482
28029
  const command = commandPath.replace(/\./g, " ");
27483
28030
  return `An unexpected error occurred. Run '${command} --help' to verify command syntax, or run with --log-level debug for details.`;
27484
28031
  }
28032
+ function isPromptCancellation(error) {
28033
+ return error instanceof Error && error.name === "ExitPromptError";
28034
+ }
28035
+ function exitCodeFromProcess(fallback) {
28036
+ return typeof process.exitCode === "number" ? process.exitCode : fallback;
28037
+ }
27485
28038
  Command.prototype.trackedAction = function(context, fn, properties) {
27486
28039
  const command = this;
27487
28040
  return this.action(async (...args) => {
@@ -27489,6 +28042,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
27489
28042
  const props = typeof properties === "function" ? properties(...args) : properties;
27490
28043
  const startTime = performance.now();
27491
28044
  let errorMessage;
28045
+ let fallbackExitCode = EXIT_CODES.Success;
28046
+ clearRecordedCommandFailureTelemetry();
27492
28047
  const [error] = await catchError(fn(...args));
27493
28048
  if (error) {
27494
28049
  errorMessage = error instanceof Error ? error.message : String(error);
@@ -27503,6 +28058,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
27503
28058
  const customRetry = isRetryHint(typedRetry) ? typedRetry : undefined;
27504
28059
  const typedContext = typed.context ?? typed.Context;
27505
28060
  const customContext = isErrorContext(typedContext) ? typedContext : undefined;
28061
+ const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation(error) ? 130 : undefined;
28062
+ fallbackExitCode = cancellationExitCode ?? EXIT_CODES[finalResult];
27506
28063
  OutputFormatter.error({
27507
28064
  Result: finalResult,
27508
28065
  ...customErrorCode ? { ErrorCode: customErrorCode } : {},
@@ -27511,16 +28068,26 @@ Command.prototype.trackedAction = function(context, fn, properties) {
27511
28068
  ...customRetry ? { Retry: customRetry } : {},
27512
28069
  ...customContext ? { Context: customContext } : {}
27513
28070
  });
27514
- context.exit(EXIT_CODES[finalResult]);
28071
+ context.exit(fallbackExitCode);
27515
28072
  }
27516
28073
  const durationMs = performance.now() - startTime;
27517
- const success = !error && (process.exitCode === undefined || process.exitCode === 0);
28074
+ const exitCode = fallbackExitCode === 130 ? fallbackExitCode : exitCodeFromProcess(fallbackExitCode);
28075
+ const recordedFailure = takeRecordedCommandFailureTelemetry();
28076
+ const success = !error && exitCode === 0;
28077
+ const terminalTelemetry = buildCommandTerminalTelemetryProperties({
28078
+ error,
28079
+ exitCode,
28080
+ recordedFailure,
28081
+ pollSignal: context.pollSignal
28082
+ });
27518
28083
  telemetry.trackEvent(telemetryName, redactProperties({
27519
28084
  ...extractCommandParams(command),
27520
28085
  ...props,
28086
+ ...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
27521
28087
  command: "true",
27522
28088
  duration: String(durationMs),
27523
28089
  success: String(success),
28090
+ ...terminalTelemetry,
27524
28091
  ...errorMessage ? { errorMessage } : {}
27525
28092
  }));
27526
28093
  });
@@ -27662,6 +28229,8 @@ function getSdkUserAgentToken(pkg) {
27662
28229
  const packageName = pkg.name.replace(/^@uipath\//, "");
27663
28230
  return getEffectiveUserAgent(`${packageName}/${pkg.version}`);
27664
28231
  }
28232
+ // ../common/src/telemetry/ship-succeeded.ts
28233
+ var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
27665
28234
  // ../common/src/tool-provider.ts
27666
28235
  var factorySlot = singleton("PackagerFactoryProvider");
27667
28236
  // ../auth/src/config.ts
@@ -28849,7 +29418,7 @@ init_server();
28849
29418
  var package_default2 = {
28850
29419
  name: "@uipath/ixp-sdk",
28851
29420
  license: "MIT",
28852
- version: "1.197.0-preview.65",
29421
+ version: "1.197.0-preview.67",
28853
29422
  description: "SDK for the UiPath IXP (Intelligent eXtraction Platform) API — projects, taxonomies, prompts, predictions, and model publishing.",
28854
29423
  repository: {
28855
29424
  type: "git",
@@ -31403,4 +31972,4 @@ export {
31403
31972
  metadata
31404
31973
  };
31405
31974
 
31406
- //# debugId=DA9FB4F959F772D664756E2164756E21
31975
+ //# debugId=073514DBC01BC15064756E2164756E21
package/package.json CHANGED
@@ -1,38 +1,30 @@
1
1
  {
2
- "name": "@uipath/ixp-tool",
3
- "license": "MIT",
4
- "version": "1.197.0-preview.65",
5
- "description": "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
6
- "private": false,
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/UiPath/cli.git",
10
- "directory": "packages/ixp-tool"
11
- },
12
- "publishConfig": {
13
- "registry": "https://registry.npmjs.org/"
14
- },
15
- "keywords": [
16
- "cli-tool"
17
- ],
18
- "type": "module",
19
- "main": "./dist/tool.js",
20
- "exports": {
21
- ".": "./dist/tool.js"
22
- },
23
- "bin": {
24
- "ixp-tool": "./dist/index.js"
25
- },
26
- "files": [
27
- "dist"
28
- ],
29
- "devDependencies": {
30
- "@uipath/common": "1.197.0",
31
- "@uipath/filesystem": "1.197.0",
32
- "@uipath/ixp-sdk": "1.197.0",
33
- "@types/node": "^25.5.2",
34
- "commander": "^14.0.3",
35
- "typescript": "^6.0.2"
36
- },
37
- "gitHead": "9388ccbe5e739c9578bfd9b5395980fb63e11d9c"
2
+ "name": "@uipath/ixp-tool",
3
+ "license": "MIT",
4
+ "version": "1.197.0-preview.67",
5
+ "description": "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
6
+ "private": false,
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/UiPath/cli.git",
10
+ "directory": "packages/ixp-tool"
11
+ },
12
+ "publishConfig": {
13
+ "registry": "https://registry.npmjs.org/"
14
+ },
15
+ "keywords": [
16
+ "cli-tool"
17
+ ],
18
+ "type": "module",
19
+ "main": "./dist/tool.js",
20
+ "exports": {
21
+ ".": "./dist/tool.js"
22
+ },
23
+ "bin": {
24
+ "ixp-tool": "./dist/index.js"
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "gitHead": "579e7d41cb100fcb8130eec8ed1c9b5b55feaf0b"
38
30
  }