@uipath/solution-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.
- package/dist/deploy.js +582 -13
- package/dist/init.js +577 -8
- package/dist/pack.js +1294 -23
- package/dist/publish.js +578 -9
- package/dist/resource.js +577 -8
- package/dist/tool.js +1446 -31
- package/package.json +2 -2
package/dist/publish.js
CHANGED
|
@@ -26547,9 +26547,228 @@ function getOutputFilter() {
|
|
|
26547
26547
|
return filterSlot.get();
|
|
26548
26548
|
}
|
|
26549
26549
|
|
|
26550
|
+
// ../common/src/telemetry/command-terminal.ts
|
|
26551
|
+
var recordedFailureSlot = singleton("CommandTelemetryFailure");
|
|
26552
|
+
var AUTH_ERROR_CODES = new Set([
|
|
26553
|
+
"authentication_required",
|
|
26554
|
+
"permission_denied"
|
|
26555
|
+
]);
|
|
26556
|
+
var VALIDATION_ERROR_CODES = new Set(["invalid_argument"]);
|
|
26557
|
+
var NETWORK_HTTP_ERROR_CODES = new Set([
|
|
26558
|
+
"network_error",
|
|
26559
|
+
"rate_limited",
|
|
26560
|
+
"server_error",
|
|
26561
|
+
"not_found",
|
|
26562
|
+
"method_not_allowed"
|
|
26563
|
+
]);
|
|
26564
|
+
var TIMEOUT_ERROR_CODES = new Set(["timeout"]);
|
|
26565
|
+
var NETWORK_OS_ERROR_CODES = new Set([
|
|
26566
|
+
"ECONNREFUSED",
|
|
26567
|
+
"ECONNRESET",
|
|
26568
|
+
"ENOTFOUND",
|
|
26569
|
+
"EAI_AGAIN",
|
|
26570
|
+
"EPIPE",
|
|
26571
|
+
"EHOSTUNREACH",
|
|
26572
|
+
"ENETUNREACH",
|
|
26573
|
+
"EAI_FAIL"
|
|
26574
|
+
]);
|
|
26575
|
+
var TIMEOUT_OS_ERROR_CODES = new Set(["ETIMEDOUT", "ESOCKETTIMEDOUT"]);
|
|
26576
|
+
var TLS_ERROR_CODES2 = new Set([
|
|
26577
|
+
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
26578
|
+
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
26579
|
+
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
26580
|
+
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
|
|
26581
|
+
"UNABLE_TO_GET_ISSUER_CERT",
|
|
26582
|
+
"CERT_HAS_EXPIRED",
|
|
26583
|
+
"CERT_UNTRUSTED",
|
|
26584
|
+
"ERR_TLS_CERT_ALTNAME_INVALID"
|
|
26585
|
+
]);
|
|
26586
|
+
var MISSING_DEPENDENCY_CODES = new Set([
|
|
26587
|
+
"MODULE_NOT_FOUND",
|
|
26588
|
+
"ERR_MODULE_NOT_FOUND"
|
|
26589
|
+
]);
|
|
26590
|
+
var INTERNAL_ERROR_NAMES = new Set([
|
|
26591
|
+
"TypeError",
|
|
26592
|
+
"ReferenceError",
|
|
26593
|
+
"SyntaxError",
|
|
26594
|
+
"RangeError"
|
|
26595
|
+
]);
|
|
26596
|
+
function isRecord(value) {
|
|
26597
|
+
return value !== null && typeof value === "object";
|
|
26598
|
+
}
|
|
26599
|
+
function stringField(value, field) {
|
|
26600
|
+
if (!isRecord(value)) {
|
|
26601
|
+
return;
|
|
26602
|
+
}
|
|
26603
|
+
const raw = value[field];
|
|
26604
|
+
return typeof raw === "string" ? raw : undefined;
|
|
26605
|
+
}
|
|
26606
|
+
function numberField(value, field) {
|
|
26607
|
+
if (!isRecord(value)) {
|
|
26608
|
+
return;
|
|
26609
|
+
}
|
|
26610
|
+
const raw = value[field];
|
|
26611
|
+
return typeof raw === "number" ? raw : undefined;
|
|
26612
|
+
}
|
|
26613
|
+
function findStringInCauseChain(error, field) {
|
|
26614
|
+
let current = error;
|
|
26615
|
+
for (let depth = 0;depth < 5 && current !== null && typeof current === "object"; depth++) {
|
|
26616
|
+
const value = stringField(current, field);
|
|
26617
|
+
if (value) {
|
|
26618
|
+
return value;
|
|
26619
|
+
}
|
|
26620
|
+
current = current.cause;
|
|
26621
|
+
}
|
|
26622
|
+
return;
|
|
26623
|
+
}
|
|
26624
|
+
function findCodeInCauseChain(error) {
|
|
26625
|
+
return findStringInCauseChain(error, "code");
|
|
26626
|
+
}
|
|
26627
|
+
function isSpawnEnoent(error) {
|
|
26628
|
+
const code = findCodeInCauseChain(error);
|
|
26629
|
+
if (code !== "ENOENT") {
|
|
26630
|
+
return false;
|
|
26631
|
+
}
|
|
26632
|
+
const syscall = findStringInCauseChain(error, "syscall");
|
|
26633
|
+
return syscall?.startsWith("spawn") === true;
|
|
26634
|
+
}
|
|
26635
|
+
function isCancellationError(error, exitCode, pollSignal) {
|
|
26636
|
+
if (exitCode === 130) {
|
|
26637
|
+
return true;
|
|
26638
|
+
}
|
|
26639
|
+
if (!isRecord(error)) {
|
|
26640
|
+
return false;
|
|
26641
|
+
}
|
|
26642
|
+
if (numberField(error, "exitCode") === 130) {
|
|
26643
|
+
return true;
|
|
26644
|
+
}
|
|
26645
|
+
const name = stringField(error, "name");
|
|
26646
|
+
if (name === "ExitPromptError") {
|
|
26647
|
+
return true;
|
|
26648
|
+
}
|
|
26649
|
+
if (name === "AbortError" && pollSignal?.aborted) {
|
|
26650
|
+
return true;
|
|
26651
|
+
}
|
|
26652
|
+
const message = stringField(error, "message");
|
|
26653
|
+
return message?.includes("SIGINT") === true;
|
|
26654
|
+
}
|
|
26655
|
+
function terminalSignalFor(input, outcome) {
|
|
26656
|
+
if (input.recordedFailure?.terminalSignal) {
|
|
26657
|
+
return input.recordedFailure.terminalSignal;
|
|
26658
|
+
}
|
|
26659
|
+
const explicit = findStringInCauseChain(input.error, "terminalSignal") ?? findStringInCauseChain(input.error, "signal");
|
|
26660
|
+
if (explicit) {
|
|
26661
|
+
return explicit;
|
|
26662
|
+
}
|
|
26663
|
+
return outcome === "cancelled" ? "SIGINT" : undefined;
|
|
26664
|
+
}
|
|
26665
|
+
function classifyHttpStatus(status) {
|
|
26666
|
+
if (status === 401 || status === 403) {
|
|
26667
|
+
return "auth";
|
|
26668
|
+
}
|
|
26669
|
+
if (status === 400 || status === 409 || status === 422) {
|
|
26670
|
+
return "validation";
|
|
26671
|
+
}
|
|
26672
|
+
if (status === 408) {
|
|
26673
|
+
return "timeout";
|
|
26674
|
+
}
|
|
26675
|
+
return "network_http";
|
|
26676
|
+
}
|
|
26677
|
+
function classifyFromResult(result) {
|
|
26678
|
+
switch (result) {
|
|
26679
|
+
case "AuthenticationError":
|
|
26680
|
+
return "auth";
|
|
26681
|
+
case "ValidationError":
|
|
26682
|
+
return "validation";
|
|
26683
|
+
case "TimeoutError":
|
|
26684
|
+
return "timeout";
|
|
26685
|
+
default:
|
|
26686
|
+
return;
|
|
26687
|
+
}
|
|
26688
|
+
}
|
|
26689
|
+
function classifyFromErrorCode(errorCode) {
|
|
26690
|
+
if (!errorCode) {
|
|
26691
|
+
return;
|
|
26692
|
+
}
|
|
26693
|
+
if (AUTH_ERROR_CODES.has(errorCode)) {
|
|
26694
|
+
return "auth";
|
|
26695
|
+
}
|
|
26696
|
+
if (VALIDATION_ERROR_CODES.has(errorCode)) {
|
|
26697
|
+
return "validation";
|
|
26698
|
+
}
|
|
26699
|
+
if (TIMEOUT_ERROR_CODES.has(errorCode)) {
|
|
26700
|
+
return "timeout";
|
|
26701
|
+
}
|
|
26702
|
+
if (NETWORK_HTTP_ERROR_CODES.has(errorCode)) {
|
|
26703
|
+
return "network_http";
|
|
26704
|
+
}
|
|
26705
|
+
return;
|
|
26706
|
+
}
|
|
26707
|
+
function classifyFromError(error) {
|
|
26708
|
+
const code = findCodeInCauseChain(error);
|
|
26709
|
+
if (code) {
|
|
26710
|
+
if (code.startsWith("commander.")) {
|
|
26711
|
+
return "validation";
|
|
26712
|
+
}
|
|
26713
|
+
if (NETWORK_OS_ERROR_CODES.has(code) || TLS_ERROR_CODES2.has(code)) {
|
|
26714
|
+
return "network_http";
|
|
26715
|
+
}
|
|
26716
|
+
if (TIMEOUT_OS_ERROR_CODES.has(code)) {
|
|
26717
|
+
return "timeout";
|
|
26718
|
+
}
|
|
26719
|
+
if (MISSING_DEPENDENCY_CODES.has(code) || isSpawnEnoent(error)) {
|
|
26720
|
+
return "missing_dependency";
|
|
26721
|
+
}
|
|
26722
|
+
}
|
|
26723
|
+
const message = stringField(error, "message");
|
|
26724
|
+
if (message?.includes("fetch failed") === true) {
|
|
26725
|
+
return "network_http";
|
|
26726
|
+
}
|
|
26727
|
+
const name = stringField(error, "name");
|
|
26728
|
+
if (name && INTERNAL_ERROR_NAMES.has(name)) {
|
|
26729
|
+
return "internal";
|
|
26730
|
+
}
|
|
26731
|
+
return;
|
|
26732
|
+
}
|
|
26733
|
+
function classifyError2(input) {
|
|
26734
|
+
const recorded = input.recordedFailure;
|
|
26735
|
+
if (recorded?.errorClass) {
|
|
26736
|
+
return recorded.errorClass;
|
|
26737
|
+
}
|
|
26738
|
+
const status = recorded?.context?.httpStatus;
|
|
26739
|
+
if (status !== undefined) {
|
|
26740
|
+
return classifyHttpStatus(status);
|
|
26741
|
+
}
|
|
26742
|
+
return classifyFromResult(recorded?.result) ?? classifyFromErrorCode(recorded?.errorCode) ?? classifyFromError(input.error) ?? "unknown";
|
|
26743
|
+
}
|
|
26744
|
+
function recordCommandFailureTelemetry(failure) {
|
|
26745
|
+
recordedFailureSlot.set(failure);
|
|
26746
|
+
}
|
|
26747
|
+
function clearRecordedCommandFailureTelemetry() {
|
|
26748
|
+
recordedFailureSlot.clear();
|
|
26749
|
+
}
|
|
26750
|
+
function takeRecordedCommandFailureTelemetry() {
|
|
26751
|
+
const failure = recordedFailureSlot.get();
|
|
26752
|
+
recordedFailureSlot.clear();
|
|
26753
|
+
return failure;
|
|
26754
|
+
}
|
|
26755
|
+
function buildCommandTerminalTelemetryProperties(input) {
|
|
26756
|
+
const cancelled = isCancellationError(input.error, input.exitCode, input.pollSignal);
|
|
26757
|
+
const outcome = input.recordedFailure?.terminalOutcome ?? (input.exitCode === 0 ? "success" : cancelled ? "cancelled" : "failure");
|
|
26758
|
+
const errorClass = outcome === "success" || outcome === "no_op" ? undefined : outcome === "cancelled" ? "user_cancelled" : classifyError2(input);
|
|
26759
|
+
const terminalSignal = terminalSignalFor(input, outcome);
|
|
26760
|
+
return {
|
|
26761
|
+
exit_code: input.exitCode,
|
|
26762
|
+
terminal_outcome: outcome,
|
|
26763
|
+
...errorClass ? { error_class: errorClass } : {},
|
|
26764
|
+
...terminalSignal ? { terminal_signal: terminalSignal } : {}
|
|
26765
|
+
};
|
|
26766
|
+
}
|
|
26767
|
+
|
|
26550
26768
|
// ../common/src/telemetry/telemetry-events.ts
|
|
26551
26769
|
var CommonTelemetryEvents = {
|
|
26552
|
-
Error: "uip.error"
|
|
26770
|
+
Error: "uip.error",
|
|
26771
|
+
ShipSucceeded: "ship_succeeded"
|
|
26553
26772
|
};
|
|
26554
26773
|
|
|
26555
26774
|
// ../common/src/registry.ts
|
|
@@ -26616,6 +26835,136 @@ function formatMessage(category, name, properties) {
|
|
|
26616
26835
|
}
|
|
26617
26836
|
return message;
|
|
26618
26837
|
}
|
|
26838
|
+
// ../common/src/telemetry/detect-agent.ts
|
|
26839
|
+
var KNOWN_AGENTS = [
|
|
26840
|
+
{ envVar: "CLAUDECODE", value: "1", id: "claude-code" },
|
|
26841
|
+
{ envVar: "CURSOR_AGENT", value: "1", id: "cursor" },
|
|
26842
|
+
{ envVar: "GEMINI_CLI", value: "1", id: "gemini-cli" },
|
|
26843
|
+
{ envVar: "CODEX_THREAD_ID", id: "codex" },
|
|
26844
|
+
{ envVar: "CODEX_SANDBOX", id: "codex" },
|
|
26845
|
+
{ envVar: "AUGMENT_AGENT", value: "1", id: "augment" },
|
|
26846
|
+
{ envVar: "CLINE_ACTIVE", value: "true", id: "cline" }
|
|
26847
|
+
];
|
|
26848
|
+
function detectAgentFromEnv(env) {
|
|
26849
|
+
for (const agent of KNOWN_AGENTS) {
|
|
26850
|
+
const envValue = env[agent.envVar];
|
|
26851
|
+
if (agent.value !== undefined) {
|
|
26852
|
+
if (envValue === agent.value)
|
|
26853
|
+
return agent.id;
|
|
26854
|
+
} else {
|
|
26855
|
+
if (envValue)
|
|
26856
|
+
return agent.id;
|
|
26857
|
+
}
|
|
26858
|
+
}
|
|
26859
|
+
const agentEnv = env.AGENT;
|
|
26860
|
+
if (agentEnv) {
|
|
26861
|
+
if (agentEnv === "1" || agentEnv === "true")
|
|
26862
|
+
return "unknown";
|
|
26863
|
+
if (agentEnv.length <= 32)
|
|
26864
|
+
return agentEnv.toLowerCase();
|
|
26865
|
+
}
|
|
26866
|
+
return;
|
|
26867
|
+
}
|
|
26868
|
+
// ../common/src/telemetry/environment-info.ts
|
|
26869
|
+
var LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
|
|
26870
|
+
// ../common/src/telemetry/execution-context.ts
|
|
26871
|
+
var authSignalSlot = singleton("TelemetryExecutionContextAuthSignal");
|
|
26872
|
+
var isTruthy = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false";
|
|
26873
|
+
var isEqual = (value, expected) => value?.toLowerCase() === expected;
|
|
26874
|
+
var CI_SIGNATURES = [
|
|
26875
|
+
{
|
|
26876
|
+
provider: "github_actions",
|
|
26877
|
+
matches: (env) => isTruthy(env.GITHUB_ACTIONS),
|
|
26878
|
+
isScheduler: (env) => env.GITHUB_EVENT_NAME === "schedule"
|
|
26879
|
+
},
|
|
26880
|
+
{
|
|
26881
|
+
provider: "azure_devops",
|
|
26882
|
+
matches: (env) => isTruthy(env.TF_BUILD),
|
|
26883
|
+
isScheduler: (env) => isEqual(env.BUILD_REASON, "schedule")
|
|
26884
|
+
},
|
|
26885
|
+
{
|
|
26886
|
+
provider: "gitlab",
|
|
26887
|
+
matches: (env) => isTruthy(env.GITLAB_CI),
|
|
26888
|
+
isScheduler: (env) => env.CI_PIPELINE_SOURCE === "schedule"
|
|
26889
|
+
},
|
|
26890
|
+
{
|
|
26891
|
+
provider: "circleci",
|
|
26892
|
+
matches: (env) => isTruthy(env.CIRCLECI),
|
|
26893
|
+
isScheduler: (env) => env.CIRCLE_PIPELINE_TRIGGER_SOURCE === "scheduled_pipeline"
|
|
26894
|
+
},
|
|
26895
|
+
{
|
|
26896
|
+
provider: "jenkins",
|
|
26897
|
+
matches: (env) => isTruthy(env.JENKINS_URL) || isTruthy(env.JENKINS_HOME)
|
|
26898
|
+
},
|
|
26899
|
+
{
|
|
26900
|
+
provider: "teamcity",
|
|
26901
|
+
matches: (env) => isTruthy(env.TEAMCITY_VERSION)
|
|
26902
|
+
},
|
|
26903
|
+
{
|
|
26904
|
+
provider: "buildkite",
|
|
26905
|
+
matches: (env) => isTruthy(env.BUILDKITE),
|
|
26906
|
+
isScheduler: (env) => env.BUILDKITE_SOURCE === "schedule"
|
|
26907
|
+
},
|
|
26908
|
+
{
|
|
26909
|
+
provider: "bitbucket",
|
|
26910
|
+
matches: (env) => isTruthy(env.BITBUCKET_BUILD_NUMBER)
|
|
26911
|
+
},
|
|
26912
|
+
{
|
|
26913
|
+
provider: "travis",
|
|
26914
|
+
matches: (env) => isTruthy(env.TRAVIS)
|
|
26915
|
+
},
|
|
26916
|
+
{
|
|
26917
|
+
provider: "appveyor",
|
|
26918
|
+
matches: (env) => isTruthy(env.APPVEYOR)
|
|
26919
|
+
},
|
|
26920
|
+
{
|
|
26921
|
+
provider: "generic",
|
|
26922
|
+
matches: (env) => isTruthy(env.CI)
|
|
26923
|
+
}
|
|
26924
|
+
];
|
|
26925
|
+
function currentEnv() {
|
|
26926
|
+
return typeof process === "undefined" ? {} : process.env;
|
|
26927
|
+
}
|
|
26928
|
+
function currentTtyState() {
|
|
26929
|
+
if (typeof process === "undefined")
|
|
26930
|
+
return false;
|
|
26931
|
+
return Boolean(process.stdout?.isTTY || process.stdin?.isTTY || process.stderr?.isTTY);
|
|
26932
|
+
}
|
|
26933
|
+
function detectCi(env) {
|
|
26934
|
+
const signature = CI_SIGNATURES.find((candidate) => candidate.matches(env));
|
|
26935
|
+
if (!signature)
|
|
26936
|
+
return;
|
|
26937
|
+
return {
|
|
26938
|
+
executionContext: signature.isScheduler?.(env) ? "scheduler" : "ci",
|
|
26939
|
+
ciProvider: signature.provider
|
|
26940
|
+
};
|
|
26941
|
+
}
|
|
26942
|
+
function detectExecutionContext(options = {}) {
|
|
26943
|
+
const env = options.env ?? currentEnv();
|
|
26944
|
+
const ci = detectCi(env);
|
|
26945
|
+
if (ci)
|
|
26946
|
+
return ci;
|
|
26947
|
+
const agent = options.agent ?? detectAgentFromEnv(env);
|
|
26948
|
+
if (agent) {
|
|
26949
|
+
return { executionContext: "agent" };
|
|
26950
|
+
}
|
|
26951
|
+
const authSignal = options.authSignal ?? authSignalSlot.get();
|
|
26952
|
+
if (authSignal === "service_account") {
|
|
26953
|
+
return { executionContext: "service_account" };
|
|
26954
|
+
}
|
|
26955
|
+
const isTty = options.isTty ?? currentTtyState();
|
|
26956
|
+
if (isTty) {
|
|
26957
|
+
return { executionContext: "manual" };
|
|
26958
|
+
}
|
|
26959
|
+
return { executionContext: "unknown" };
|
|
26960
|
+
}
|
|
26961
|
+
function getExecutionContextTelemetryProperties() {
|
|
26962
|
+
const detected = detectExecutionContext();
|
|
26963
|
+
return {
|
|
26964
|
+
execution_context: detected.executionContext,
|
|
26965
|
+
...detected.ciProvider ? { ci_provider: detected.ciProvider } : {}
|
|
26966
|
+
};
|
|
26967
|
+
}
|
|
26619
26968
|
// ../common/src/telemetry/node-context-storage.ts
|
|
26620
26969
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
26621
26970
|
|
|
@@ -26628,6 +26977,26 @@ class NodeContextStorage {
|
|
|
26628
26977
|
return this.storage.getStore();
|
|
26629
26978
|
}
|
|
26630
26979
|
}
|
|
26980
|
+
// ../common/src/telemetry/session-id.ts
|
|
26981
|
+
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
26982
|
+
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
26983
|
+
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
26984
|
+
function getProcessEnv() {
|
|
26985
|
+
return globalThis.process?.env;
|
|
26986
|
+
}
|
|
26987
|
+
function normalizeSessionId(value) {
|
|
26988
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
26989
|
+
return;
|
|
26990
|
+
}
|
|
26991
|
+
const trimmed = String(value).trim();
|
|
26992
|
+
return trimmed || undefined;
|
|
26993
|
+
}
|
|
26994
|
+
function getConfiguredTelemetrySessionId() {
|
|
26995
|
+
return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
26996
|
+
}
|
|
26997
|
+
function resolveTelemetrySessionId(existingSessionId) {
|
|
26998
|
+
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
26999
|
+
}
|
|
26631
27000
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
26632
27001
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
26633
27002
|
function getGlobalTelemetryProperties() {
|
|
@@ -26712,12 +27081,22 @@ class TelemetryService {
|
|
|
26712
27081
|
return this.contextStorage.getContext();
|
|
26713
27082
|
}
|
|
26714
27083
|
enrichPropertiesWithContext(properties, context) {
|
|
26715
|
-
|
|
26716
|
-
|
|
27084
|
+
const globalProperties = getGlobalTelemetryProperties();
|
|
27085
|
+
const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
|
|
27086
|
+
const sessionId = resolveTelemetrySessionId(existingSessionId);
|
|
27087
|
+
const enriched = {
|
|
27088
|
+
...getExecutionContextTelemetryProperties(),
|
|
27089
|
+
...globalProperties,
|
|
26717
27090
|
...this.defaultProperties,
|
|
26718
27091
|
...properties,
|
|
26719
27092
|
...context
|
|
26720
27093
|
};
|
|
27094
|
+
if (sessionId === undefined) {
|
|
27095
|
+
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
27096
|
+
} else {
|
|
27097
|
+
enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
|
|
27098
|
+
}
|
|
27099
|
+
return enriched;
|
|
26721
27100
|
}
|
|
26722
27101
|
generateId() {
|
|
26723
27102
|
return crypto.randomUUID().replaceAll("-", "");
|
|
@@ -27187,8 +27566,24 @@ var OutputFormatter;
|
|
|
27187
27566
|
data.ErrorCode ??= defaultErrorCodeForFailure(data);
|
|
27188
27567
|
data.Retry ??= defaultRetryForErrorCode(data.ErrorCode);
|
|
27189
27568
|
process.exitCode = EXIT_CODES[data.Result] ?? 1;
|
|
27190
|
-
|
|
27191
|
-
|
|
27569
|
+
recordCommandFailureTelemetry({
|
|
27570
|
+
result: data.Result,
|
|
27571
|
+
errorCode: data.ErrorCode,
|
|
27572
|
+
retry: data.Retry,
|
|
27573
|
+
message: data.Message,
|
|
27574
|
+
context: data.Context,
|
|
27575
|
+
exitCode: process.exitCode,
|
|
27576
|
+
errorClass: data.TelemetryErrorClass,
|
|
27577
|
+
terminalOutcome: data.TelemetryTerminalOutcome,
|
|
27578
|
+
terminalSignal: data.TelemetryTerminalSignal
|
|
27579
|
+
});
|
|
27580
|
+
const suppressTelemetry = data.SuppressTelemetry === true;
|
|
27581
|
+
const envelope = { ...data };
|
|
27582
|
+
delete envelope.SuppressTelemetry;
|
|
27583
|
+
delete envelope.TelemetryErrorClass;
|
|
27584
|
+
delete envelope.TelemetryTerminalOutcome;
|
|
27585
|
+
delete envelope.TelemetryTerminalSignal;
|
|
27586
|
+
if (!suppressTelemetry) {
|
|
27192
27587
|
telemetry.trackEvent(CommonTelemetryEvents.Error, {
|
|
27193
27588
|
result: data.Result,
|
|
27194
27589
|
errorCode: data.ErrorCode,
|
|
@@ -27251,6 +27646,158 @@ var OutputFormatter;
|
|
|
27251
27646
|
OutputFormatter.formatToString = formatToString;
|
|
27252
27647
|
})(OutputFormatter ||= {});
|
|
27253
27648
|
|
|
27649
|
+
// ../common/src/telemetry/command-attribution.ts
|
|
27650
|
+
var LEGACY_SKILL_NAMESPACE = "uipath:";
|
|
27651
|
+
var MAX_SKILL_NAME_LENGTH = 80;
|
|
27652
|
+
var SKILL_NAME_PATTERN = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
27653
|
+
function productMode(productArea, mode) {
|
|
27654
|
+
return { product_area: productArea, mode };
|
|
27655
|
+
}
|
|
27656
|
+
function attributionRecord(groups) {
|
|
27657
|
+
const record = {};
|
|
27658
|
+
for (const [productArea, mode, names] of groups) {
|
|
27659
|
+
const attribution = productMode(productArea, mode);
|
|
27660
|
+
for (const name of names) {
|
|
27661
|
+
record[name] = attribution;
|
|
27662
|
+
}
|
|
27663
|
+
}
|
|
27664
|
+
return record;
|
|
27665
|
+
}
|
|
27666
|
+
function commandAttribution(groups) {
|
|
27667
|
+
const entries = [];
|
|
27668
|
+
for (const [productArea, mode, prefixes] of groups) {
|
|
27669
|
+
const attribution = productMode(productArea, mode);
|
|
27670
|
+
for (const prefix of prefixes) {
|
|
27671
|
+
entries.push({ prefix, attribution });
|
|
27672
|
+
}
|
|
27673
|
+
}
|
|
27674
|
+
return entries;
|
|
27675
|
+
}
|
|
27676
|
+
var SKILL_ATTRIBUTION = attributionRecord([
|
|
27677
|
+
["admin", "operate", ["uipath-admin"]],
|
|
27678
|
+
["agents", "build", ["uipath-agents"]],
|
|
27679
|
+
["api-workflow", "build", ["uipath-api-workflow"]],
|
|
27680
|
+
["automation-discovery", "build", ["uipath-automation-discovery"]],
|
|
27681
|
+
["coded-apps", "build", ["uipath-coded-apps"]],
|
|
27682
|
+
["data-fabric", "operate", ["uipath-data-fabric"]],
|
|
27683
|
+
["cli", "troubleshoot", ["uipath-feedback"]],
|
|
27684
|
+
["governance", "operate", ["uipath-governance"]],
|
|
27685
|
+
["action-center", "build", ["uipath-human-in-the-loop"]],
|
|
27686
|
+
["document-understanding", "build", ["uipath-ixp"]],
|
|
27687
|
+
[
|
|
27688
|
+
"maestro",
|
|
27689
|
+
"build",
|
|
27690
|
+
["uipath-maestro-bpmn", "uipath-maestro-case", "uipath-maestro-flow"]
|
|
27691
|
+
],
|
|
27692
|
+
["agenthub", "build", ["uipath-mcp-servers"]],
|
|
27693
|
+
["solution", "build", ["uipath-planner", "uipath-solution"]],
|
|
27694
|
+
["platform", "operate", ["uipath-platform"]],
|
|
27695
|
+
["quality", "troubleshoot", ["uipath-review"]],
|
|
27696
|
+
["rpa", "build", ["uipath-rpa"]],
|
|
27697
|
+
["cli", "operate", ["uipath-skill-catalog"]],
|
|
27698
|
+
["action-center", "operate", ["uipath-tasks"]],
|
|
27699
|
+
["test-manager", "operate", ["uipath-test"]],
|
|
27700
|
+
["platform", "troubleshoot", ["uipath-troubleshoot"]]
|
|
27701
|
+
]);
|
|
27702
|
+
var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
|
|
27703
|
+
var COMMAND_ATTRIBUTION = commandAttribution([
|
|
27704
|
+
["cli", "troubleshoot", ["uip.feedback"]],
|
|
27705
|
+
["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
|
|
27706
|
+
["context-grounding", "build", ["uip.context-grounding"]],
|
|
27707
|
+
["api-workflow", "build", ["uip.api-workflow"]],
|
|
27708
|
+
["rpa", "build", ["uip.rpa-legacy"]],
|
|
27709
|
+
["conversational", "operate", ["uip.conversational"]],
|
|
27710
|
+
["agents", "build", ["uip.codedagent", "uip.agent"]],
|
|
27711
|
+
["agenthub", "build", ["uip.agenthub"]],
|
|
27712
|
+
["coded-apps", "build", ["uip.codedapp"]],
|
|
27713
|
+
["functions", "build", ["uip.functions"]],
|
|
27714
|
+
["solution", "build", ["uip.solution"]],
|
|
27715
|
+
["maestro", "build", ["uip.maestro", "uip.case", "uip.flow"]],
|
|
27716
|
+
["llm-observability", "troubleshoot", ["uip.traces"]],
|
|
27717
|
+
["platform", "operate", ["uip.platform"]],
|
|
27718
|
+
["admin", "operate", ["uip.admin"]],
|
|
27719
|
+
["automation-ops", "operate", ["uip.aops"]],
|
|
27720
|
+
["documentation", "troubleshoot", ["uip.docsai"]],
|
|
27721
|
+
["governance", "operate", ["uip.gov"]],
|
|
27722
|
+
["insights", "operate", ["uip.insights"]],
|
|
27723
|
+
["document-understanding", "build", ["uip.ixp"]],
|
|
27724
|
+
["process-mining", "operate", ["uip.pm"]],
|
|
27725
|
+
["action-center", "operate", ["uip.tasks"]],
|
|
27726
|
+
["test-manager", "operate", ["uip.tm"]],
|
|
27727
|
+
["vertical-solutions", "build", ["uip.vss"]],
|
|
27728
|
+
["data-fabric", "operate", ["uip.df"]],
|
|
27729
|
+
["integration-service", "build", ["uip.is"]],
|
|
27730
|
+
["orchestrator", "operate", ["uip.or"]],
|
|
27731
|
+
[
|
|
27732
|
+
"cli",
|
|
27733
|
+
"operate",
|
|
27734
|
+
[
|
|
27735
|
+
"uip.login",
|
|
27736
|
+
"uip.logout",
|
|
27737
|
+
"uip.user",
|
|
27738
|
+
"uip.config",
|
|
27739
|
+
"uip.tools",
|
|
27740
|
+
"uip.skills",
|
|
27741
|
+
"uip.completion",
|
|
27742
|
+
"uip.update",
|
|
27743
|
+
"uip.mcp",
|
|
27744
|
+
"uip.track"
|
|
27745
|
+
]
|
|
27746
|
+
]
|
|
27747
|
+
]).sort((a, b) => b.prefix.length - a.prefix.length);
|
|
27748
|
+
function normalizeCommandPath(value) {
|
|
27749
|
+
if (typeof value !== "string") {
|
|
27750
|
+
return;
|
|
27751
|
+
}
|
|
27752
|
+
const trimmed = value.trim().toLowerCase();
|
|
27753
|
+
if (!trimmed) {
|
|
27754
|
+
return;
|
|
27755
|
+
}
|
|
27756
|
+
const tokens = trimmed.includes(" ") ? trimmed.split(/\s+/).filter((token) => token.length > 0).filter((token) => !token.startsWith("-")) : trimmed.split(".").filter((token) => token.length > 0);
|
|
27757
|
+
if (tokens.length === 0) {
|
|
27758
|
+
return;
|
|
27759
|
+
}
|
|
27760
|
+
const commandTokens = tokens[0] === "uip" ? tokens : ["uip", ...tokens];
|
|
27761
|
+
return commandTokens.join(".");
|
|
27762
|
+
}
|
|
27763
|
+
function getCommandProductModeAttribution(commandPath) {
|
|
27764
|
+
const normalized = normalizeCommandPath(commandPath);
|
|
27765
|
+
if (!normalized) {
|
|
27766
|
+
return;
|
|
27767
|
+
}
|
|
27768
|
+
return COMMAND_ATTRIBUTION.find(({ prefix }) => normalized === prefix || normalized.startsWith(`${prefix}.`))?.attribution;
|
|
27769
|
+
}
|
|
27770
|
+
function normalizeSkillNameWithOptions(value, options) {
|
|
27771
|
+
if (typeof value !== "string") {
|
|
27772
|
+
return;
|
|
27773
|
+
}
|
|
27774
|
+
const normalized = value.trim().toLowerCase();
|
|
27775
|
+
if (!normalized) {
|
|
27776
|
+
return;
|
|
27777
|
+
}
|
|
27778
|
+
const hasLegacyNamespace = normalized.startsWith(LEGACY_SKILL_NAMESPACE);
|
|
27779
|
+
if (hasLegacyNamespace && !options.allowLegacyNamespace) {
|
|
27780
|
+
return;
|
|
27781
|
+
}
|
|
27782
|
+
const skillName = hasLegacyNamespace ? normalized.slice(LEGACY_SKILL_NAMESPACE.length) : normalized;
|
|
27783
|
+
if (skillName.length > MAX_SKILL_NAME_LENGTH || !SKILL_NAME_PATTERN.test(skillName) || !KNOWN_SKILL_NAMES.has(skillName)) {
|
|
27784
|
+
return;
|
|
27785
|
+
}
|
|
27786
|
+
return skillName;
|
|
27787
|
+
}
|
|
27788
|
+
function normalizeSkillName(value) {
|
|
27789
|
+
return normalizeSkillNameWithOptions(value, {
|
|
27790
|
+
allowLegacyNamespace: false
|
|
27791
|
+
});
|
|
27792
|
+
}
|
|
27793
|
+
function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
27794
|
+
const skillName = normalizeSkillName(skillSource);
|
|
27795
|
+
return {
|
|
27796
|
+
...skillName ? { skill_name: skillName } : {},
|
|
27797
|
+
...getCommandProductModeAttribution(commandPath)
|
|
27798
|
+
};
|
|
27799
|
+
}
|
|
27800
|
+
|
|
27254
27801
|
// ../common/src/telemetry/pii-redactor.ts
|
|
27255
27802
|
var REDACTED = "[REDACTED]";
|
|
27256
27803
|
var MAX_VALUE_LENGTH = 200;
|
|
@@ -27428,6 +27975,12 @@ function commandHelpHint(commandPath) {
|
|
|
27428
27975
|
const command = commandPath.replace(/\./g, " ");
|
|
27429
27976
|
return `An unexpected error occurred. Run '${command} --help' to verify command syntax, or run with --log-level debug for details.`;
|
|
27430
27977
|
}
|
|
27978
|
+
function isPromptCancellation(error) {
|
|
27979
|
+
return error instanceof Error && error.name === "ExitPromptError";
|
|
27980
|
+
}
|
|
27981
|
+
function exitCodeFromProcess(fallback) {
|
|
27982
|
+
return typeof process.exitCode === "number" ? process.exitCode : fallback;
|
|
27983
|
+
}
|
|
27431
27984
|
Command.prototype.trackedAction = function(context, fn, properties) {
|
|
27432
27985
|
const command = this;
|
|
27433
27986
|
return this.action(async (...args) => {
|
|
@@ -27435,6 +27988,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
27435
27988
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
27436
27989
|
const startTime = performance.now();
|
|
27437
27990
|
let errorMessage;
|
|
27991
|
+
let fallbackExitCode = EXIT_CODES.Success;
|
|
27992
|
+
clearRecordedCommandFailureTelemetry();
|
|
27438
27993
|
const [error] = await catchError(fn(...args));
|
|
27439
27994
|
if (error) {
|
|
27440
27995
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -27449,6 +28004,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
27449
28004
|
const customRetry = isRetryHint(typedRetry) ? typedRetry : undefined;
|
|
27450
28005
|
const typedContext = typed.context ?? typed.Context;
|
|
27451
28006
|
const customContext = isErrorContext(typedContext) ? typedContext : undefined;
|
|
28007
|
+
const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation(error) ? 130 : undefined;
|
|
28008
|
+
fallbackExitCode = cancellationExitCode ?? EXIT_CODES[finalResult];
|
|
27452
28009
|
OutputFormatter.error({
|
|
27453
28010
|
Result: finalResult,
|
|
27454
28011
|
...customErrorCode ? { ErrorCode: customErrorCode } : {},
|
|
@@ -27457,16 +28014,26 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
27457
28014
|
...customRetry ? { Retry: customRetry } : {},
|
|
27458
28015
|
...customContext ? { Context: customContext } : {}
|
|
27459
28016
|
});
|
|
27460
|
-
context.exit(
|
|
28017
|
+
context.exit(fallbackExitCode);
|
|
27461
28018
|
}
|
|
27462
28019
|
const durationMs = performance.now() - startTime;
|
|
27463
|
-
const
|
|
28020
|
+
const exitCode = fallbackExitCode === 130 ? fallbackExitCode : exitCodeFromProcess(fallbackExitCode);
|
|
28021
|
+
const recordedFailure = takeRecordedCommandFailureTelemetry();
|
|
28022
|
+
const success = !error && exitCode === 0;
|
|
28023
|
+
const terminalTelemetry = buildCommandTerminalTelemetryProperties({
|
|
28024
|
+
error,
|
|
28025
|
+
exitCode,
|
|
28026
|
+
recordedFailure,
|
|
28027
|
+
pollSignal: context.pollSignal
|
|
28028
|
+
});
|
|
27464
28029
|
telemetry.trackEvent(telemetryName, redactProperties({
|
|
27465
28030
|
...extractCommandParams(command),
|
|
27466
28031
|
...props,
|
|
28032
|
+
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
27467
28033
|
command: "true",
|
|
27468
28034
|
duration: String(durationMs),
|
|
27469
28035
|
success: String(success),
|
|
28036
|
+
...terminalTelemetry,
|
|
27470
28037
|
...errorMessage ? { errorMessage } : {}
|
|
27471
28038
|
}));
|
|
27472
28039
|
});
|
|
@@ -28029,6 +28596,8 @@ function installRequestHeaderForwarding(BaseApiClass, patchKey, forward) {
|
|
|
28029
28596
|
function installSdkUserAgentHeader(BaseApiClass, userAgent) {
|
|
28030
28597
|
installRequestHeaderForwarding(BaseApiClass, userAgentPatchKey(userAgent), (headers) => addSdkUserAgentHeader(headers, userAgent));
|
|
28031
28598
|
}
|
|
28599
|
+
// ../common/src/telemetry/ship-succeeded.ts
|
|
28600
|
+
var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
|
|
28032
28601
|
// ../common/src/tool-provider.ts
|
|
28033
28602
|
var factorySlot = singleton("PackagerFactoryProvider");
|
|
28034
28603
|
// src/services/publish-service.ts
|
|
@@ -29631,7 +30200,7 @@ class TextApiResponse2 {
|
|
|
29631
30200
|
var package_default2 = {
|
|
29632
30201
|
name: "@uipath/solution-sdk",
|
|
29633
30202
|
license: "MIT",
|
|
29634
|
-
version: "1.197.0-preview.
|
|
30203
|
+
version: "1.197.0-preview.67",
|
|
29635
30204
|
repository: {
|
|
29636
30205
|
type: "git",
|
|
29637
30206
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -32392,4 +32961,4 @@ export {
|
|
|
32392
32961
|
publishSolutionAsync
|
|
32393
32962
|
};
|
|
32394
32963
|
|
|
32395
|
-
//# debugId=
|
|
32964
|
+
//# debugId=EC2BEF673AB6453464756E2164756E21
|