@uipath/data-fabric-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 (2) hide show
  1. package/dist/tool.js +580 -11
  2. package/package.json +2 -2
package/dist/tool.js CHANGED
@@ -27244,7 +27244,7 @@ var require_src6 = __commonJS((exports) => {
27244
27244
  var package_default = {
27245
27245
  name: "@uipath/data-fabric-tool",
27246
27246
  license: "MIT",
27247
- version: "1.197.0-preview.65",
27247
+ version: "1.197.0-preview.67",
27248
27248
  description: "Manage Data Fabric entities and records.",
27249
27249
  type: "module",
27250
27250
  main: "./dist/tool.js",
@@ -32597,9 +32597,228 @@ function getOutputFilter() {
32597
32597
  return filterSlot.get();
32598
32598
  }
32599
32599
 
32600
+ // ../common/src/telemetry/command-terminal.ts
32601
+ var recordedFailureSlot = singleton("CommandTelemetryFailure");
32602
+ var AUTH_ERROR_CODES = new Set([
32603
+ "authentication_required",
32604
+ "permission_denied"
32605
+ ]);
32606
+ var VALIDATION_ERROR_CODES = new Set(["invalid_argument"]);
32607
+ var NETWORK_HTTP_ERROR_CODES = new Set([
32608
+ "network_error",
32609
+ "rate_limited",
32610
+ "server_error",
32611
+ "not_found",
32612
+ "method_not_allowed"
32613
+ ]);
32614
+ var TIMEOUT_ERROR_CODES = new Set(["timeout"]);
32615
+ var NETWORK_OS_ERROR_CODES = new Set([
32616
+ "ECONNREFUSED",
32617
+ "ECONNRESET",
32618
+ "ENOTFOUND",
32619
+ "EAI_AGAIN",
32620
+ "EPIPE",
32621
+ "EHOSTUNREACH",
32622
+ "ENETUNREACH",
32623
+ "EAI_FAIL"
32624
+ ]);
32625
+ var TIMEOUT_OS_ERROR_CODES = new Set(["ETIMEDOUT", "ESOCKETTIMEDOUT"]);
32626
+ var TLS_ERROR_CODES2 = new Set([
32627
+ "SELF_SIGNED_CERT_IN_CHAIN",
32628
+ "DEPTH_ZERO_SELF_SIGNED_CERT",
32629
+ "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
32630
+ "UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
32631
+ "UNABLE_TO_GET_ISSUER_CERT",
32632
+ "CERT_HAS_EXPIRED",
32633
+ "CERT_UNTRUSTED",
32634
+ "ERR_TLS_CERT_ALTNAME_INVALID"
32635
+ ]);
32636
+ var MISSING_DEPENDENCY_CODES = new Set([
32637
+ "MODULE_NOT_FOUND",
32638
+ "ERR_MODULE_NOT_FOUND"
32639
+ ]);
32640
+ var INTERNAL_ERROR_NAMES = new Set([
32641
+ "TypeError",
32642
+ "ReferenceError",
32643
+ "SyntaxError",
32644
+ "RangeError"
32645
+ ]);
32646
+ function isRecord(value) {
32647
+ return value !== null && typeof value === "object";
32648
+ }
32649
+ function stringField(value, field) {
32650
+ if (!isRecord(value)) {
32651
+ return;
32652
+ }
32653
+ const raw = value[field];
32654
+ return typeof raw === "string" ? raw : undefined;
32655
+ }
32656
+ function numberField(value, field) {
32657
+ if (!isRecord(value)) {
32658
+ return;
32659
+ }
32660
+ const raw = value[field];
32661
+ return typeof raw === "number" ? raw : undefined;
32662
+ }
32663
+ function findStringInCauseChain(error, field) {
32664
+ let current = error;
32665
+ for (let depth = 0;depth < 5 && current !== null && typeof current === "object"; depth++) {
32666
+ const value = stringField(current, field);
32667
+ if (value) {
32668
+ return value;
32669
+ }
32670
+ current = current.cause;
32671
+ }
32672
+ return;
32673
+ }
32674
+ function findCodeInCauseChain(error) {
32675
+ return findStringInCauseChain(error, "code");
32676
+ }
32677
+ function isSpawnEnoent(error) {
32678
+ const code = findCodeInCauseChain(error);
32679
+ if (code !== "ENOENT") {
32680
+ return false;
32681
+ }
32682
+ const syscall = findStringInCauseChain(error, "syscall");
32683
+ return syscall?.startsWith("spawn") === true;
32684
+ }
32685
+ function isCancellationError(error, exitCode, pollSignal) {
32686
+ if (exitCode === 130) {
32687
+ return true;
32688
+ }
32689
+ if (!isRecord(error)) {
32690
+ return false;
32691
+ }
32692
+ if (numberField(error, "exitCode") === 130) {
32693
+ return true;
32694
+ }
32695
+ const name = stringField(error, "name");
32696
+ if (name === "ExitPromptError") {
32697
+ return true;
32698
+ }
32699
+ if (name === "AbortError" && pollSignal?.aborted) {
32700
+ return true;
32701
+ }
32702
+ const message = stringField(error, "message");
32703
+ return message?.includes("SIGINT") === true;
32704
+ }
32705
+ function terminalSignalFor(input, outcome) {
32706
+ if (input.recordedFailure?.terminalSignal) {
32707
+ return input.recordedFailure.terminalSignal;
32708
+ }
32709
+ const explicit = findStringInCauseChain(input.error, "terminalSignal") ?? findStringInCauseChain(input.error, "signal");
32710
+ if (explicit) {
32711
+ return explicit;
32712
+ }
32713
+ return outcome === "cancelled" ? "SIGINT" : undefined;
32714
+ }
32715
+ function classifyHttpStatus(status) {
32716
+ if (status === 401 || status === 403) {
32717
+ return "auth";
32718
+ }
32719
+ if (status === 400 || status === 409 || status === 422) {
32720
+ return "validation";
32721
+ }
32722
+ if (status === 408) {
32723
+ return "timeout";
32724
+ }
32725
+ return "network_http";
32726
+ }
32727
+ function classifyFromResult(result) {
32728
+ switch (result) {
32729
+ case "AuthenticationError":
32730
+ return "auth";
32731
+ case "ValidationError":
32732
+ return "validation";
32733
+ case "TimeoutError":
32734
+ return "timeout";
32735
+ default:
32736
+ return;
32737
+ }
32738
+ }
32739
+ function classifyFromErrorCode(errorCode) {
32740
+ if (!errorCode) {
32741
+ return;
32742
+ }
32743
+ if (AUTH_ERROR_CODES.has(errorCode)) {
32744
+ return "auth";
32745
+ }
32746
+ if (VALIDATION_ERROR_CODES.has(errorCode)) {
32747
+ return "validation";
32748
+ }
32749
+ if (TIMEOUT_ERROR_CODES.has(errorCode)) {
32750
+ return "timeout";
32751
+ }
32752
+ if (NETWORK_HTTP_ERROR_CODES.has(errorCode)) {
32753
+ return "network_http";
32754
+ }
32755
+ return;
32756
+ }
32757
+ function classifyFromError(error) {
32758
+ const code = findCodeInCauseChain(error);
32759
+ if (code) {
32760
+ if (code.startsWith("commander.")) {
32761
+ return "validation";
32762
+ }
32763
+ if (NETWORK_OS_ERROR_CODES.has(code) || TLS_ERROR_CODES2.has(code)) {
32764
+ return "network_http";
32765
+ }
32766
+ if (TIMEOUT_OS_ERROR_CODES.has(code)) {
32767
+ return "timeout";
32768
+ }
32769
+ if (MISSING_DEPENDENCY_CODES.has(code) || isSpawnEnoent(error)) {
32770
+ return "missing_dependency";
32771
+ }
32772
+ }
32773
+ const message = stringField(error, "message");
32774
+ if (message?.includes("fetch failed") === true) {
32775
+ return "network_http";
32776
+ }
32777
+ const name = stringField(error, "name");
32778
+ if (name && INTERNAL_ERROR_NAMES.has(name)) {
32779
+ return "internal";
32780
+ }
32781
+ return;
32782
+ }
32783
+ function classifyError2(input) {
32784
+ const recorded = input.recordedFailure;
32785
+ if (recorded?.errorClass) {
32786
+ return recorded.errorClass;
32787
+ }
32788
+ const status = recorded?.context?.httpStatus;
32789
+ if (status !== undefined) {
32790
+ return classifyHttpStatus(status);
32791
+ }
32792
+ return classifyFromResult(recorded?.result) ?? classifyFromErrorCode(recorded?.errorCode) ?? classifyFromError(input.error) ?? "unknown";
32793
+ }
32794
+ function recordCommandFailureTelemetry(failure) {
32795
+ recordedFailureSlot.set(failure);
32796
+ }
32797
+ function clearRecordedCommandFailureTelemetry() {
32798
+ recordedFailureSlot.clear();
32799
+ }
32800
+ function takeRecordedCommandFailureTelemetry() {
32801
+ const failure = recordedFailureSlot.get();
32802
+ recordedFailureSlot.clear();
32803
+ return failure;
32804
+ }
32805
+ function buildCommandTerminalTelemetryProperties(input) {
32806
+ const cancelled = isCancellationError(input.error, input.exitCode, input.pollSignal);
32807
+ const outcome = input.recordedFailure?.terminalOutcome ?? (input.exitCode === 0 ? "success" : cancelled ? "cancelled" : "failure");
32808
+ const errorClass = outcome === "success" || outcome === "no_op" ? undefined : outcome === "cancelled" ? "user_cancelled" : classifyError2(input);
32809
+ const terminalSignal = terminalSignalFor(input, outcome);
32810
+ return {
32811
+ exit_code: input.exitCode,
32812
+ terminal_outcome: outcome,
32813
+ ...errorClass ? { error_class: errorClass } : {},
32814
+ ...terminalSignal ? { terminal_signal: terminalSignal } : {}
32815
+ };
32816
+ }
32817
+
32600
32818
  // ../common/src/telemetry/telemetry-events.ts
32601
32819
  var CommonTelemetryEvents = {
32602
- Error: "uip.error"
32820
+ Error: "uip.error",
32821
+ ShipSucceeded: "ship_succeeded"
32603
32822
  };
32604
32823
 
32605
32824
  // ../common/src/registry.ts
@@ -32666,6 +32885,136 @@ function formatMessage(category, name, properties) {
32666
32885
  }
32667
32886
  return message;
32668
32887
  }
32888
+ // ../common/src/telemetry/detect-agent.ts
32889
+ var KNOWN_AGENTS = [
32890
+ { envVar: "CLAUDECODE", value: "1", id: "claude-code" },
32891
+ { envVar: "CURSOR_AGENT", value: "1", id: "cursor" },
32892
+ { envVar: "GEMINI_CLI", value: "1", id: "gemini-cli" },
32893
+ { envVar: "CODEX_THREAD_ID", id: "codex" },
32894
+ { envVar: "CODEX_SANDBOX", id: "codex" },
32895
+ { envVar: "AUGMENT_AGENT", value: "1", id: "augment" },
32896
+ { envVar: "CLINE_ACTIVE", value: "true", id: "cline" }
32897
+ ];
32898
+ function detectAgentFromEnv(env) {
32899
+ for (const agent of KNOWN_AGENTS) {
32900
+ const envValue = env[agent.envVar];
32901
+ if (agent.value !== undefined) {
32902
+ if (envValue === agent.value)
32903
+ return agent.id;
32904
+ } else {
32905
+ if (envValue)
32906
+ return agent.id;
32907
+ }
32908
+ }
32909
+ const agentEnv = env.AGENT;
32910
+ if (agentEnv) {
32911
+ if (agentEnv === "1" || agentEnv === "true")
32912
+ return "unknown";
32913
+ if (agentEnv.length <= 32)
32914
+ return agentEnv.toLowerCase();
32915
+ }
32916
+ return;
32917
+ }
32918
+ // ../common/src/telemetry/environment-info.ts
32919
+ var LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
32920
+ // ../common/src/telemetry/execution-context.ts
32921
+ var authSignalSlot = singleton("TelemetryExecutionContextAuthSignal");
32922
+ var isTruthy = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false";
32923
+ var isEqual = (value, expected) => value?.toLowerCase() === expected;
32924
+ var CI_SIGNATURES = [
32925
+ {
32926
+ provider: "github_actions",
32927
+ matches: (env) => isTruthy(env.GITHUB_ACTIONS),
32928
+ isScheduler: (env) => env.GITHUB_EVENT_NAME === "schedule"
32929
+ },
32930
+ {
32931
+ provider: "azure_devops",
32932
+ matches: (env) => isTruthy(env.TF_BUILD),
32933
+ isScheduler: (env) => isEqual(env.BUILD_REASON, "schedule")
32934
+ },
32935
+ {
32936
+ provider: "gitlab",
32937
+ matches: (env) => isTruthy(env.GITLAB_CI),
32938
+ isScheduler: (env) => env.CI_PIPELINE_SOURCE === "schedule"
32939
+ },
32940
+ {
32941
+ provider: "circleci",
32942
+ matches: (env) => isTruthy(env.CIRCLECI),
32943
+ isScheduler: (env) => env.CIRCLE_PIPELINE_TRIGGER_SOURCE === "scheduled_pipeline"
32944
+ },
32945
+ {
32946
+ provider: "jenkins",
32947
+ matches: (env) => isTruthy(env.JENKINS_URL) || isTruthy(env.JENKINS_HOME)
32948
+ },
32949
+ {
32950
+ provider: "teamcity",
32951
+ matches: (env) => isTruthy(env.TEAMCITY_VERSION)
32952
+ },
32953
+ {
32954
+ provider: "buildkite",
32955
+ matches: (env) => isTruthy(env.BUILDKITE),
32956
+ isScheduler: (env) => env.BUILDKITE_SOURCE === "schedule"
32957
+ },
32958
+ {
32959
+ provider: "bitbucket",
32960
+ matches: (env) => isTruthy(env.BITBUCKET_BUILD_NUMBER)
32961
+ },
32962
+ {
32963
+ provider: "travis",
32964
+ matches: (env) => isTruthy(env.TRAVIS)
32965
+ },
32966
+ {
32967
+ provider: "appveyor",
32968
+ matches: (env) => isTruthy(env.APPVEYOR)
32969
+ },
32970
+ {
32971
+ provider: "generic",
32972
+ matches: (env) => isTruthy(env.CI)
32973
+ }
32974
+ ];
32975
+ function currentEnv() {
32976
+ return typeof process === "undefined" ? {} : process.env;
32977
+ }
32978
+ function currentTtyState() {
32979
+ if (typeof process === "undefined")
32980
+ return false;
32981
+ return Boolean(process.stdout?.isTTY || process.stdin?.isTTY || process.stderr?.isTTY);
32982
+ }
32983
+ function detectCi(env) {
32984
+ const signature = CI_SIGNATURES.find((candidate) => candidate.matches(env));
32985
+ if (!signature)
32986
+ return;
32987
+ return {
32988
+ executionContext: signature.isScheduler?.(env) ? "scheduler" : "ci",
32989
+ ciProvider: signature.provider
32990
+ };
32991
+ }
32992
+ function detectExecutionContext(options = {}) {
32993
+ const env = options.env ?? currentEnv();
32994
+ const ci = detectCi(env);
32995
+ if (ci)
32996
+ return ci;
32997
+ const agent = options.agent ?? detectAgentFromEnv(env);
32998
+ if (agent) {
32999
+ return { executionContext: "agent" };
33000
+ }
33001
+ const authSignal = options.authSignal ?? authSignalSlot.get();
33002
+ if (authSignal === "service_account") {
33003
+ return { executionContext: "service_account" };
33004
+ }
33005
+ const isTty = options.isTty ?? currentTtyState();
33006
+ if (isTty) {
33007
+ return { executionContext: "manual" };
33008
+ }
33009
+ return { executionContext: "unknown" };
33010
+ }
33011
+ function getExecutionContextTelemetryProperties() {
33012
+ const detected = detectExecutionContext();
33013
+ return {
33014
+ execution_context: detected.executionContext,
33015
+ ...detected.ciProvider ? { ci_provider: detected.ciProvider } : {}
33016
+ };
33017
+ }
32669
33018
  // ../common/src/telemetry/node-context-storage.ts
32670
33019
  import { AsyncLocalStorage } from "node:async_hooks";
32671
33020
 
@@ -32678,6 +33027,26 @@ class NodeContextStorage {
32678
33027
  return this.storage.getStore();
32679
33028
  }
32680
33029
  }
33030
+ // ../common/src/telemetry/session-id.ts
33031
+ var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
33032
+ var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
33033
+ var telemetrySessionIdSlot = singleton("TelemetrySessionId");
33034
+ function getProcessEnv() {
33035
+ return globalThis.process?.env;
33036
+ }
33037
+ function normalizeSessionId(value) {
33038
+ if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
33039
+ return;
33040
+ }
33041
+ const trimmed = String(value).trim();
33042
+ return trimmed || undefined;
33043
+ }
33044
+ function getConfiguredTelemetrySessionId() {
33045
+ return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
33046
+ }
33047
+ function resolveTelemetrySessionId(existingSessionId) {
33048
+ return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
33049
+ }
32681
33050
  // ../common/src/telemetry/global-telemetry-properties.ts
32682
33051
  var telemetryPropsSlot = singleton("TelemetryDefaultProps");
32683
33052
  function getGlobalTelemetryProperties() {
@@ -32762,12 +33131,22 @@ class TelemetryService {
32762
33131
  return this.contextStorage.getContext();
32763
33132
  }
32764
33133
  enrichPropertiesWithContext(properties, context) {
32765
- return {
32766
- ...getGlobalTelemetryProperties(),
33134
+ const globalProperties = getGlobalTelemetryProperties();
33135
+ const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
33136
+ const sessionId = resolveTelemetrySessionId(existingSessionId);
33137
+ const enriched = {
33138
+ ...getExecutionContextTelemetryProperties(),
33139
+ ...globalProperties,
32767
33140
  ...this.defaultProperties,
32768
33141
  ...properties,
32769
33142
  ...context
32770
33143
  };
33144
+ if (sessionId === undefined) {
33145
+ delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
33146
+ } else {
33147
+ enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
33148
+ }
33149
+ return enriched;
32771
33150
  }
32772
33151
  generateId() {
32773
33152
  return crypto.randomUUID().replaceAll("-", "");
@@ -33237,8 +33616,24 @@ var OutputFormatter;
33237
33616
  data.ErrorCode ??= defaultErrorCodeForFailure(data);
33238
33617
  data.Retry ??= defaultRetryForErrorCode(data.ErrorCode);
33239
33618
  process.exitCode = EXIT_CODES[data.Result] ?? 1;
33240
- const { SuppressTelemetry, ...envelope } = data;
33241
- if (!SuppressTelemetry) {
33619
+ recordCommandFailureTelemetry({
33620
+ result: data.Result,
33621
+ errorCode: data.ErrorCode,
33622
+ retry: data.Retry,
33623
+ message: data.Message,
33624
+ context: data.Context,
33625
+ exitCode: process.exitCode,
33626
+ errorClass: data.TelemetryErrorClass,
33627
+ terminalOutcome: data.TelemetryTerminalOutcome,
33628
+ terminalSignal: data.TelemetryTerminalSignal
33629
+ });
33630
+ const suppressTelemetry = data.SuppressTelemetry === true;
33631
+ const envelope = { ...data };
33632
+ delete envelope.SuppressTelemetry;
33633
+ delete envelope.TelemetryErrorClass;
33634
+ delete envelope.TelemetryTerminalOutcome;
33635
+ delete envelope.TelemetryTerminalSignal;
33636
+ if (!suppressTelemetry) {
33242
33637
  telemetry.trackEvent(CommonTelemetryEvents.Error, {
33243
33638
  result: data.Result,
33244
33639
  errorCode: data.ErrorCode,
@@ -33301,6 +33696,158 @@ var OutputFormatter;
33301
33696
  OutputFormatter.formatToString = formatToString;
33302
33697
  })(OutputFormatter ||= {});
33303
33698
 
33699
+ // ../common/src/telemetry/command-attribution.ts
33700
+ var LEGACY_SKILL_NAMESPACE = "uipath:";
33701
+ var MAX_SKILL_NAME_LENGTH = 80;
33702
+ var SKILL_NAME_PATTERN = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
33703
+ function productMode(productArea, mode) {
33704
+ return { product_area: productArea, mode };
33705
+ }
33706
+ function attributionRecord(groups) {
33707
+ const record = {};
33708
+ for (const [productArea, mode, names] of groups) {
33709
+ const attribution = productMode(productArea, mode);
33710
+ for (const name of names) {
33711
+ record[name] = attribution;
33712
+ }
33713
+ }
33714
+ return record;
33715
+ }
33716
+ function commandAttribution(groups) {
33717
+ const entries = [];
33718
+ for (const [productArea, mode, prefixes] of groups) {
33719
+ const attribution = productMode(productArea, mode);
33720
+ for (const prefix of prefixes) {
33721
+ entries.push({ prefix, attribution });
33722
+ }
33723
+ }
33724
+ return entries;
33725
+ }
33726
+ var SKILL_ATTRIBUTION = attributionRecord([
33727
+ ["admin", "operate", ["uipath-admin"]],
33728
+ ["agents", "build", ["uipath-agents"]],
33729
+ ["api-workflow", "build", ["uipath-api-workflow"]],
33730
+ ["automation-discovery", "build", ["uipath-automation-discovery"]],
33731
+ ["coded-apps", "build", ["uipath-coded-apps"]],
33732
+ ["data-fabric", "operate", ["uipath-data-fabric"]],
33733
+ ["cli", "troubleshoot", ["uipath-feedback"]],
33734
+ ["governance", "operate", ["uipath-governance"]],
33735
+ ["action-center", "build", ["uipath-human-in-the-loop"]],
33736
+ ["document-understanding", "build", ["uipath-ixp"]],
33737
+ [
33738
+ "maestro",
33739
+ "build",
33740
+ ["uipath-maestro-bpmn", "uipath-maestro-case", "uipath-maestro-flow"]
33741
+ ],
33742
+ ["agenthub", "build", ["uipath-mcp-servers"]],
33743
+ ["solution", "build", ["uipath-planner", "uipath-solution"]],
33744
+ ["platform", "operate", ["uipath-platform"]],
33745
+ ["quality", "troubleshoot", ["uipath-review"]],
33746
+ ["rpa", "build", ["uipath-rpa"]],
33747
+ ["cli", "operate", ["uipath-skill-catalog"]],
33748
+ ["action-center", "operate", ["uipath-tasks"]],
33749
+ ["test-manager", "operate", ["uipath-test"]],
33750
+ ["platform", "troubleshoot", ["uipath-troubleshoot"]]
33751
+ ]);
33752
+ var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
33753
+ var COMMAND_ATTRIBUTION = commandAttribution([
33754
+ ["cli", "troubleshoot", ["uip.feedback"]],
33755
+ ["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
33756
+ ["context-grounding", "build", ["uip.context-grounding"]],
33757
+ ["api-workflow", "build", ["uip.api-workflow"]],
33758
+ ["rpa", "build", ["uip.rpa-legacy"]],
33759
+ ["conversational", "operate", ["uip.conversational"]],
33760
+ ["agents", "build", ["uip.codedagent", "uip.agent"]],
33761
+ ["agenthub", "build", ["uip.agenthub"]],
33762
+ ["coded-apps", "build", ["uip.codedapp"]],
33763
+ ["functions", "build", ["uip.functions"]],
33764
+ ["solution", "build", ["uip.solution"]],
33765
+ ["maestro", "build", ["uip.maestro", "uip.case", "uip.flow"]],
33766
+ ["llm-observability", "troubleshoot", ["uip.traces"]],
33767
+ ["platform", "operate", ["uip.platform"]],
33768
+ ["admin", "operate", ["uip.admin"]],
33769
+ ["automation-ops", "operate", ["uip.aops"]],
33770
+ ["documentation", "troubleshoot", ["uip.docsai"]],
33771
+ ["governance", "operate", ["uip.gov"]],
33772
+ ["insights", "operate", ["uip.insights"]],
33773
+ ["document-understanding", "build", ["uip.ixp"]],
33774
+ ["process-mining", "operate", ["uip.pm"]],
33775
+ ["action-center", "operate", ["uip.tasks"]],
33776
+ ["test-manager", "operate", ["uip.tm"]],
33777
+ ["vertical-solutions", "build", ["uip.vss"]],
33778
+ ["data-fabric", "operate", ["uip.df"]],
33779
+ ["integration-service", "build", ["uip.is"]],
33780
+ ["orchestrator", "operate", ["uip.or"]],
33781
+ [
33782
+ "cli",
33783
+ "operate",
33784
+ [
33785
+ "uip.login",
33786
+ "uip.logout",
33787
+ "uip.user",
33788
+ "uip.config",
33789
+ "uip.tools",
33790
+ "uip.skills",
33791
+ "uip.completion",
33792
+ "uip.update",
33793
+ "uip.mcp",
33794
+ "uip.track"
33795
+ ]
33796
+ ]
33797
+ ]).sort((a, b) => b.prefix.length - a.prefix.length);
33798
+ function normalizeCommandPath(value) {
33799
+ if (typeof value !== "string") {
33800
+ return;
33801
+ }
33802
+ const trimmed = value.trim().toLowerCase();
33803
+ if (!trimmed) {
33804
+ return;
33805
+ }
33806
+ const tokens = trimmed.includes(" ") ? trimmed.split(/\s+/).filter((token) => token.length > 0).filter((token) => !token.startsWith("-")) : trimmed.split(".").filter((token) => token.length > 0);
33807
+ if (tokens.length === 0) {
33808
+ return;
33809
+ }
33810
+ const commandTokens = tokens[0] === "uip" ? tokens : ["uip", ...tokens];
33811
+ return commandTokens.join(".");
33812
+ }
33813
+ function getCommandProductModeAttribution(commandPath) {
33814
+ const normalized = normalizeCommandPath(commandPath);
33815
+ if (!normalized) {
33816
+ return;
33817
+ }
33818
+ return COMMAND_ATTRIBUTION.find(({ prefix }) => normalized === prefix || normalized.startsWith(`${prefix}.`))?.attribution;
33819
+ }
33820
+ function normalizeSkillNameWithOptions(value, options) {
33821
+ if (typeof value !== "string") {
33822
+ return;
33823
+ }
33824
+ const normalized = value.trim().toLowerCase();
33825
+ if (!normalized) {
33826
+ return;
33827
+ }
33828
+ const hasLegacyNamespace = normalized.startsWith(LEGACY_SKILL_NAMESPACE);
33829
+ if (hasLegacyNamespace && !options.allowLegacyNamespace) {
33830
+ return;
33831
+ }
33832
+ const skillName = hasLegacyNamespace ? normalized.slice(LEGACY_SKILL_NAMESPACE.length) : normalized;
33833
+ if (skillName.length > MAX_SKILL_NAME_LENGTH || !SKILL_NAME_PATTERN.test(skillName) || !KNOWN_SKILL_NAMES.has(skillName)) {
33834
+ return;
33835
+ }
33836
+ return skillName;
33837
+ }
33838
+ function normalizeSkillName(value) {
33839
+ return normalizeSkillNameWithOptions(value, {
33840
+ allowLegacyNamespace: false
33841
+ });
33842
+ }
33843
+ function buildCommandTelemetryAttribution(commandPath, skillSource) {
33844
+ const skillName = normalizeSkillName(skillSource);
33845
+ return {
33846
+ ...skillName ? { skill_name: skillName } : {},
33847
+ ...getCommandProductModeAttribution(commandPath)
33848
+ };
33849
+ }
33850
+
33304
33851
  // ../common/src/telemetry/pii-redactor.ts
33305
33852
  var REDACTED = "[REDACTED]";
33306
33853
  var MAX_VALUE_LENGTH = 200;
@@ -33486,6 +34033,12 @@ function commandHelpHint(commandPath) {
33486
34033
  const command = commandPath.replace(/\./g, " ");
33487
34034
  return `An unexpected error occurred. Run '${command} --help' to verify command syntax, or run with --log-level debug for details.`;
33488
34035
  }
34036
+ function isPromptCancellation(error) {
34037
+ return error instanceof Error && error.name === "ExitPromptError";
34038
+ }
34039
+ function exitCodeFromProcess(fallback) {
34040
+ return typeof process.exitCode === "number" ? process.exitCode : fallback;
34041
+ }
33489
34042
  Command.prototype.trackedAction = function(context, fn, properties) {
33490
34043
  const command = this;
33491
34044
  return this.action(async (...args) => {
@@ -33493,6 +34046,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
33493
34046
  const props = typeof properties === "function" ? properties(...args) : properties;
33494
34047
  const startTime = performance.now();
33495
34048
  let errorMessage;
34049
+ let fallbackExitCode = EXIT_CODES.Success;
34050
+ clearRecordedCommandFailureTelemetry();
33496
34051
  const [error] = await catchError(fn(...args));
33497
34052
  if (error) {
33498
34053
  errorMessage = error instanceof Error ? error.message : String(error);
@@ -33507,6 +34062,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
33507
34062
  const customRetry = isRetryHint(typedRetry) ? typedRetry : undefined;
33508
34063
  const typedContext = typed.context ?? typed.Context;
33509
34064
  const customContext = isErrorContext(typedContext) ? typedContext : undefined;
34065
+ const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation(error) ? 130 : undefined;
34066
+ fallbackExitCode = cancellationExitCode ?? EXIT_CODES[finalResult];
33510
34067
  OutputFormatter.error({
33511
34068
  Result: finalResult,
33512
34069
  ...customErrorCode ? { ErrorCode: customErrorCode } : {},
@@ -33515,16 +34072,26 @@ Command.prototype.trackedAction = function(context, fn, properties) {
33515
34072
  ...customRetry ? { Retry: customRetry } : {},
33516
34073
  ...customContext ? { Context: customContext } : {}
33517
34074
  });
33518
- context.exit(EXIT_CODES[finalResult]);
34075
+ context.exit(fallbackExitCode);
33519
34076
  }
33520
34077
  const durationMs = performance.now() - startTime;
33521
- const success = !error && (process.exitCode === undefined || process.exitCode === 0);
34078
+ const exitCode = fallbackExitCode === 130 ? fallbackExitCode : exitCodeFromProcess(fallbackExitCode);
34079
+ const recordedFailure = takeRecordedCommandFailureTelemetry();
34080
+ const success = !error && exitCode === 0;
34081
+ const terminalTelemetry = buildCommandTerminalTelemetryProperties({
34082
+ error,
34083
+ exitCode,
34084
+ recordedFailure,
34085
+ pollSignal: context.pollSignal
34086
+ });
33522
34087
  telemetry.trackEvent(telemetryName, redactProperties({
33523
34088
  ...extractCommandParams(command),
33524
34089
  ...props,
34090
+ ...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
33525
34091
  command: "true",
33526
34092
  duration: String(durationMs),
33527
34093
  success: String(success),
34094
+ ...terminalTelemetry,
33528
34095
  ...errorMessage ? { errorMessage } : {}
33529
34096
  }));
33530
34097
  });
@@ -33638,6 +34205,8 @@ async function readStdin() {
33638
34205
  process.stdin.on("error", reject);
33639
34206
  });
33640
34207
  }
34208
+ // ../common/src/telemetry/ship-succeeded.ts
34209
+ var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
33641
34210
  // ../common/src/tool-provider.ts
33642
34211
  var factorySlot = singleton("PackagerFactoryProvider");
33643
34212
  // src/utils/output.ts
@@ -39918,7 +40487,7 @@ function validateConfig(config2) {
39918
40487
  function isCompleteConfig(config2) {
39919
40488
  return hasRequiredBaseFields(config2) && hasValidAuthConfig(config2);
39920
40489
  }
39921
- function normalizeBaseUrl(url) {
40490
+ function normalizeBaseUrl2(url) {
39922
40491
  return url.endsWith("/") ? url.slice(0, -1) : url;
39923
40492
  }
39924
40493
  var REGISTRY_KEY2 = Symbol.for("@uipath/sdk-internals-registry");
@@ -40092,7 +40661,7 @@ _UiPath_config = new WeakMap, _UiPath_authService = new WeakMap, _UiPath_initial
40092
40661
  const hasSecretAuth = hasSecretConfig(config2);
40093
40662
  const hasOAuthAuth = hasOAuthConfig(config2);
40094
40663
  const internalConfig = new UiPathConfig({
40095
- baseUrl: normalizeBaseUrl(config2.baseUrl),
40664
+ baseUrl: normalizeBaseUrl2(config2.baseUrl),
40096
40665
  orgName: config2.orgName,
40097
40666
  tenantName: config2.tenantName,
40098
40667
  secret: hasSecretAuth ? config2.secret : undefined,
@@ -46083,4 +46652,4 @@ export {
46083
46652
  metadata
46084
46653
  };
46085
46654
 
46086
- //# debugId=D77B2F846B71F6BF64756E2164756E21
46655
+ //# debugId=2786D95844C3752164756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/data-fabric-tool",
3
3
  "license": "MIT",
4
- "version": "1.197.0-preview.65",
4
+ "version": "1.197.0-preview.67",
5
5
  "description": "Manage Data Fabric entities and records.",
6
6
  "type": "module",
7
7
  "main": "./dist/tool.js",
@@ -14,5 +14,5 @@
14
14
  "publishConfig": {
15
15
  "registry": "https://registry.npmjs.org/"
16
16
  },
17
- "gitHead": "9388ccbe5e739c9578bfd9b5395980fb63e11d9c"
17
+ "gitHead": "579e7d41cb100fcb8130eec8ed1c9b5b55feaf0b"
18
18
  }