@uipath/flow-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/init.js +585 -16
- package/dist/packager-tool.js +2 -2
- package/dist/tool.js +1199 -76
- package/dist/validation.js +583 -14
- package/package.json +2 -2
package/dist/validation.js
CHANGED
|
@@ -185327,9 +185327,228 @@ function getOutputFilter() {
|
|
|
185327
185327
|
return filterSlot.get();
|
|
185328
185328
|
}
|
|
185329
185329
|
|
|
185330
|
+
// ../common/src/telemetry/command-terminal.ts
|
|
185331
|
+
var recordedFailureSlot = singleton("CommandTelemetryFailure");
|
|
185332
|
+
var AUTH_ERROR_CODES = new Set([
|
|
185333
|
+
"authentication_required",
|
|
185334
|
+
"permission_denied"
|
|
185335
|
+
]);
|
|
185336
|
+
var VALIDATION_ERROR_CODES = new Set(["invalid_argument"]);
|
|
185337
|
+
var NETWORK_HTTP_ERROR_CODES = new Set([
|
|
185338
|
+
"network_error",
|
|
185339
|
+
"rate_limited",
|
|
185340
|
+
"server_error",
|
|
185341
|
+
"not_found",
|
|
185342
|
+
"method_not_allowed"
|
|
185343
|
+
]);
|
|
185344
|
+
var TIMEOUT_ERROR_CODES = new Set(["timeout"]);
|
|
185345
|
+
var NETWORK_OS_ERROR_CODES = new Set([
|
|
185346
|
+
"ECONNREFUSED",
|
|
185347
|
+
"ECONNRESET",
|
|
185348
|
+
"ENOTFOUND",
|
|
185349
|
+
"EAI_AGAIN",
|
|
185350
|
+
"EPIPE",
|
|
185351
|
+
"EHOSTUNREACH",
|
|
185352
|
+
"ENETUNREACH",
|
|
185353
|
+
"EAI_FAIL"
|
|
185354
|
+
]);
|
|
185355
|
+
var TIMEOUT_OS_ERROR_CODES = new Set(["ETIMEDOUT", "ESOCKETTIMEDOUT"]);
|
|
185356
|
+
var TLS_ERROR_CODES2 = new Set([
|
|
185357
|
+
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
185358
|
+
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
185359
|
+
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
185360
|
+
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
|
|
185361
|
+
"UNABLE_TO_GET_ISSUER_CERT",
|
|
185362
|
+
"CERT_HAS_EXPIRED",
|
|
185363
|
+
"CERT_UNTRUSTED",
|
|
185364
|
+
"ERR_TLS_CERT_ALTNAME_INVALID"
|
|
185365
|
+
]);
|
|
185366
|
+
var MISSING_DEPENDENCY_CODES = new Set([
|
|
185367
|
+
"MODULE_NOT_FOUND",
|
|
185368
|
+
"ERR_MODULE_NOT_FOUND"
|
|
185369
|
+
]);
|
|
185370
|
+
var INTERNAL_ERROR_NAMES = new Set([
|
|
185371
|
+
"TypeError",
|
|
185372
|
+
"ReferenceError",
|
|
185373
|
+
"SyntaxError",
|
|
185374
|
+
"RangeError"
|
|
185375
|
+
]);
|
|
185376
|
+
function isRecord(value) {
|
|
185377
|
+
return value !== null && typeof value === "object";
|
|
185378
|
+
}
|
|
185379
|
+
function stringField(value, field) {
|
|
185380
|
+
if (!isRecord(value)) {
|
|
185381
|
+
return;
|
|
185382
|
+
}
|
|
185383
|
+
const raw = value[field];
|
|
185384
|
+
return typeof raw === "string" ? raw : undefined;
|
|
185385
|
+
}
|
|
185386
|
+
function numberField(value, field) {
|
|
185387
|
+
if (!isRecord(value)) {
|
|
185388
|
+
return;
|
|
185389
|
+
}
|
|
185390
|
+
const raw = value[field];
|
|
185391
|
+
return typeof raw === "number" ? raw : undefined;
|
|
185392
|
+
}
|
|
185393
|
+
function findStringInCauseChain(error, field) {
|
|
185394
|
+
let current = error;
|
|
185395
|
+
for (let depth = 0;depth < 5 && current !== null && typeof current === "object"; depth++) {
|
|
185396
|
+
const value = stringField(current, field);
|
|
185397
|
+
if (value) {
|
|
185398
|
+
return value;
|
|
185399
|
+
}
|
|
185400
|
+
current = current.cause;
|
|
185401
|
+
}
|
|
185402
|
+
return;
|
|
185403
|
+
}
|
|
185404
|
+
function findCodeInCauseChain(error) {
|
|
185405
|
+
return findStringInCauseChain(error, "code");
|
|
185406
|
+
}
|
|
185407
|
+
function isSpawnEnoent(error) {
|
|
185408
|
+
const code = findCodeInCauseChain(error);
|
|
185409
|
+
if (code !== "ENOENT") {
|
|
185410
|
+
return false;
|
|
185411
|
+
}
|
|
185412
|
+
const syscall = findStringInCauseChain(error, "syscall");
|
|
185413
|
+
return syscall?.startsWith("spawn") === true;
|
|
185414
|
+
}
|
|
185415
|
+
function isCancellationError(error, exitCode, pollSignal) {
|
|
185416
|
+
if (exitCode === 130) {
|
|
185417
|
+
return true;
|
|
185418
|
+
}
|
|
185419
|
+
if (!isRecord(error)) {
|
|
185420
|
+
return false;
|
|
185421
|
+
}
|
|
185422
|
+
if (numberField(error, "exitCode") === 130) {
|
|
185423
|
+
return true;
|
|
185424
|
+
}
|
|
185425
|
+
const name = stringField(error, "name");
|
|
185426
|
+
if (name === "ExitPromptError") {
|
|
185427
|
+
return true;
|
|
185428
|
+
}
|
|
185429
|
+
if (name === "AbortError" && pollSignal?.aborted) {
|
|
185430
|
+
return true;
|
|
185431
|
+
}
|
|
185432
|
+
const message = stringField(error, "message");
|
|
185433
|
+
return message?.includes("SIGINT") === true;
|
|
185434
|
+
}
|
|
185435
|
+
function terminalSignalFor(input, outcome) {
|
|
185436
|
+
if (input.recordedFailure?.terminalSignal) {
|
|
185437
|
+
return input.recordedFailure.terminalSignal;
|
|
185438
|
+
}
|
|
185439
|
+
const explicit = findStringInCauseChain(input.error, "terminalSignal") ?? findStringInCauseChain(input.error, "signal");
|
|
185440
|
+
if (explicit) {
|
|
185441
|
+
return explicit;
|
|
185442
|
+
}
|
|
185443
|
+
return outcome === "cancelled" ? "SIGINT" : undefined;
|
|
185444
|
+
}
|
|
185445
|
+
function classifyHttpStatus(status) {
|
|
185446
|
+
if (status === 401 || status === 403) {
|
|
185447
|
+
return "auth";
|
|
185448
|
+
}
|
|
185449
|
+
if (status === 400 || status === 409 || status === 422) {
|
|
185450
|
+
return "validation";
|
|
185451
|
+
}
|
|
185452
|
+
if (status === 408) {
|
|
185453
|
+
return "timeout";
|
|
185454
|
+
}
|
|
185455
|
+
return "network_http";
|
|
185456
|
+
}
|
|
185457
|
+
function classifyFromResult(result) {
|
|
185458
|
+
switch (result) {
|
|
185459
|
+
case "AuthenticationError":
|
|
185460
|
+
return "auth";
|
|
185461
|
+
case "ValidationError":
|
|
185462
|
+
return "validation";
|
|
185463
|
+
case "TimeoutError":
|
|
185464
|
+
return "timeout";
|
|
185465
|
+
default:
|
|
185466
|
+
return;
|
|
185467
|
+
}
|
|
185468
|
+
}
|
|
185469
|
+
function classifyFromErrorCode(errorCode2) {
|
|
185470
|
+
if (!errorCode2) {
|
|
185471
|
+
return;
|
|
185472
|
+
}
|
|
185473
|
+
if (AUTH_ERROR_CODES.has(errorCode2)) {
|
|
185474
|
+
return "auth";
|
|
185475
|
+
}
|
|
185476
|
+
if (VALIDATION_ERROR_CODES.has(errorCode2)) {
|
|
185477
|
+
return "validation";
|
|
185478
|
+
}
|
|
185479
|
+
if (TIMEOUT_ERROR_CODES.has(errorCode2)) {
|
|
185480
|
+
return "timeout";
|
|
185481
|
+
}
|
|
185482
|
+
if (NETWORK_HTTP_ERROR_CODES.has(errorCode2)) {
|
|
185483
|
+
return "network_http";
|
|
185484
|
+
}
|
|
185485
|
+
return;
|
|
185486
|
+
}
|
|
185487
|
+
function classifyFromError(error) {
|
|
185488
|
+
const code = findCodeInCauseChain(error);
|
|
185489
|
+
if (code) {
|
|
185490
|
+
if (code.startsWith("commander.")) {
|
|
185491
|
+
return "validation";
|
|
185492
|
+
}
|
|
185493
|
+
if (NETWORK_OS_ERROR_CODES.has(code) || TLS_ERROR_CODES2.has(code)) {
|
|
185494
|
+
return "network_http";
|
|
185495
|
+
}
|
|
185496
|
+
if (TIMEOUT_OS_ERROR_CODES.has(code)) {
|
|
185497
|
+
return "timeout";
|
|
185498
|
+
}
|
|
185499
|
+
if (MISSING_DEPENDENCY_CODES.has(code) || isSpawnEnoent(error)) {
|
|
185500
|
+
return "missing_dependency";
|
|
185501
|
+
}
|
|
185502
|
+
}
|
|
185503
|
+
const message = stringField(error, "message");
|
|
185504
|
+
if (message?.includes("fetch failed") === true) {
|
|
185505
|
+
return "network_http";
|
|
185506
|
+
}
|
|
185507
|
+
const name = stringField(error, "name");
|
|
185508
|
+
if (name && INTERNAL_ERROR_NAMES.has(name)) {
|
|
185509
|
+
return "internal";
|
|
185510
|
+
}
|
|
185511
|
+
return;
|
|
185512
|
+
}
|
|
185513
|
+
function classifyError(input) {
|
|
185514
|
+
const recorded = input.recordedFailure;
|
|
185515
|
+
if (recorded?.errorClass) {
|
|
185516
|
+
return recorded.errorClass;
|
|
185517
|
+
}
|
|
185518
|
+
const status = recorded?.context?.httpStatus;
|
|
185519
|
+
if (status !== undefined) {
|
|
185520
|
+
return classifyHttpStatus(status);
|
|
185521
|
+
}
|
|
185522
|
+
return classifyFromResult(recorded?.result) ?? classifyFromErrorCode(recorded?.errorCode) ?? classifyFromError(input.error) ?? "unknown";
|
|
185523
|
+
}
|
|
185524
|
+
function recordCommandFailureTelemetry(failure) {
|
|
185525
|
+
recordedFailureSlot.set(failure);
|
|
185526
|
+
}
|
|
185527
|
+
function clearRecordedCommandFailureTelemetry() {
|
|
185528
|
+
recordedFailureSlot.clear();
|
|
185529
|
+
}
|
|
185530
|
+
function takeRecordedCommandFailureTelemetry() {
|
|
185531
|
+
const failure = recordedFailureSlot.get();
|
|
185532
|
+
recordedFailureSlot.clear();
|
|
185533
|
+
return failure;
|
|
185534
|
+
}
|
|
185535
|
+
function buildCommandTerminalTelemetryProperties(input) {
|
|
185536
|
+
const cancelled = isCancellationError(input.error, input.exitCode, input.pollSignal);
|
|
185537
|
+
const outcome = input.recordedFailure?.terminalOutcome ?? (input.exitCode === 0 ? "success" : cancelled ? "cancelled" : "failure");
|
|
185538
|
+
const errorClass = outcome === "success" || outcome === "no_op" ? undefined : outcome === "cancelled" ? "user_cancelled" : classifyError(input);
|
|
185539
|
+
const terminalSignal = terminalSignalFor(input, outcome);
|
|
185540
|
+
return {
|
|
185541
|
+
exit_code: input.exitCode,
|
|
185542
|
+
terminal_outcome: outcome,
|
|
185543
|
+
...errorClass ? { error_class: errorClass } : {},
|
|
185544
|
+
...terminalSignal ? { terminal_signal: terminalSignal } : {}
|
|
185545
|
+
};
|
|
185546
|
+
}
|
|
185547
|
+
|
|
185330
185548
|
// ../common/src/telemetry/telemetry-events.ts
|
|
185331
185549
|
var CommonTelemetryEvents = {
|
|
185332
|
-
Error: "uip.error"
|
|
185550
|
+
Error: "uip.error",
|
|
185551
|
+
ShipSucceeded: "ship_succeeded"
|
|
185333
185552
|
};
|
|
185334
185553
|
|
|
185335
185554
|
// ../common/src/registry.ts
|
|
@@ -185396,6 +185615,136 @@ function formatMessage(category, name, properties) {
|
|
|
185396
185615
|
}
|
|
185397
185616
|
return message;
|
|
185398
185617
|
}
|
|
185618
|
+
// ../common/src/telemetry/detect-agent.ts
|
|
185619
|
+
var KNOWN_AGENTS = [
|
|
185620
|
+
{ envVar: "CLAUDECODE", value: "1", id: "claude-code" },
|
|
185621
|
+
{ envVar: "CURSOR_AGENT", value: "1", id: "cursor" },
|
|
185622
|
+
{ envVar: "GEMINI_CLI", value: "1", id: "gemini-cli" },
|
|
185623
|
+
{ envVar: "CODEX_THREAD_ID", id: "codex" },
|
|
185624
|
+
{ envVar: "CODEX_SANDBOX", id: "codex" },
|
|
185625
|
+
{ envVar: "AUGMENT_AGENT", value: "1", id: "augment" },
|
|
185626
|
+
{ envVar: "CLINE_ACTIVE", value: "true", id: "cline" }
|
|
185627
|
+
];
|
|
185628
|
+
function detectAgentFromEnv(env) {
|
|
185629
|
+
for (const agent of KNOWN_AGENTS) {
|
|
185630
|
+
const envValue = env[agent.envVar];
|
|
185631
|
+
if (agent.value !== undefined) {
|
|
185632
|
+
if (envValue === agent.value)
|
|
185633
|
+
return agent.id;
|
|
185634
|
+
} else {
|
|
185635
|
+
if (envValue)
|
|
185636
|
+
return agent.id;
|
|
185637
|
+
}
|
|
185638
|
+
}
|
|
185639
|
+
const agentEnv = env.AGENT;
|
|
185640
|
+
if (agentEnv) {
|
|
185641
|
+
if (agentEnv === "1" || agentEnv === "true")
|
|
185642
|
+
return "unknown";
|
|
185643
|
+
if (agentEnv.length <= 32)
|
|
185644
|
+
return agentEnv.toLowerCase();
|
|
185645
|
+
}
|
|
185646
|
+
return;
|
|
185647
|
+
}
|
|
185648
|
+
// ../common/src/telemetry/environment-info.ts
|
|
185649
|
+
var LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
|
|
185650
|
+
// ../common/src/telemetry/execution-context.ts
|
|
185651
|
+
var authSignalSlot = singleton("TelemetryExecutionContextAuthSignal");
|
|
185652
|
+
var isTruthy = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false";
|
|
185653
|
+
var isEqual = (value, expected) => value?.toLowerCase() === expected;
|
|
185654
|
+
var CI_SIGNATURES = [
|
|
185655
|
+
{
|
|
185656
|
+
provider: "github_actions",
|
|
185657
|
+
matches: (env) => isTruthy(env.GITHUB_ACTIONS),
|
|
185658
|
+
isScheduler: (env) => env.GITHUB_EVENT_NAME === "schedule"
|
|
185659
|
+
},
|
|
185660
|
+
{
|
|
185661
|
+
provider: "azure_devops",
|
|
185662
|
+
matches: (env) => isTruthy(env.TF_BUILD),
|
|
185663
|
+
isScheduler: (env) => isEqual(env.BUILD_REASON, "schedule")
|
|
185664
|
+
},
|
|
185665
|
+
{
|
|
185666
|
+
provider: "gitlab",
|
|
185667
|
+
matches: (env) => isTruthy(env.GITLAB_CI),
|
|
185668
|
+
isScheduler: (env) => env.CI_PIPELINE_SOURCE === "schedule"
|
|
185669
|
+
},
|
|
185670
|
+
{
|
|
185671
|
+
provider: "circleci",
|
|
185672
|
+
matches: (env) => isTruthy(env.CIRCLECI),
|
|
185673
|
+
isScheduler: (env) => env.CIRCLE_PIPELINE_TRIGGER_SOURCE === "scheduled_pipeline"
|
|
185674
|
+
},
|
|
185675
|
+
{
|
|
185676
|
+
provider: "jenkins",
|
|
185677
|
+
matches: (env) => isTruthy(env.JENKINS_URL) || isTruthy(env.JENKINS_HOME)
|
|
185678
|
+
},
|
|
185679
|
+
{
|
|
185680
|
+
provider: "teamcity",
|
|
185681
|
+
matches: (env) => isTruthy(env.TEAMCITY_VERSION)
|
|
185682
|
+
},
|
|
185683
|
+
{
|
|
185684
|
+
provider: "buildkite",
|
|
185685
|
+
matches: (env) => isTruthy(env.BUILDKITE),
|
|
185686
|
+
isScheduler: (env) => env.BUILDKITE_SOURCE === "schedule"
|
|
185687
|
+
},
|
|
185688
|
+
{
|
|
185689
|
+
provider: "bitbucket",
|
|
185690
|
+
matches: (env) => isTruthy(env.BITBUCKET_BUILD_NUMBER)
|
|
185691
|
+
},
|
|
185692
|
+
{
|
|
185693
|
+
provider: "travis",
|
|
185694
|
+
matches: (env) => isTruthy(env.TRAVIS)
|
|
185695
|
+
},
|
|
185696
|
+
{
|
|
185697
|
+
provider: "appveyor",
|
|
185698
|
+
matches: (env) => isTruthy(env.APPVEYOR)
|
|
185699
|
+
},
|
|
185700
|
+
{
|
|
185701
|
+
provider: "generic",
|
|
185702
|
+
matches: (env) => isTruthy(env.CI)
|
|
185703
|
+
}
|
|
185704
|
+
];
|
|
185705
|
+
function currentEnv() {
|
|
185706
|
+
return typeof process === "undefined" ? {} : process.env;
|
|
185707
|
+
}
|
|
185708
|
+
function currentTtyState() {
|
|
185709
|
+
if (typeof process === "undefined")
|
|
185710
|
+
return false;
|
|
185711
|
+
return Boolean(process.stdout?.isTTY || process.stdin?.isTTY || process.stderr?.isTTY);
|
|
185712
|
+
}
|
|
185713
|
+
function detectCi(env) {
|
|
185714
|
+
const signature = CI_SIGNATURES.find((candidate) => candidate.matches(env));
|
|
185715
|
+
if (!signature)
|
|
185716
|
+
return;
|
|
185717
|
+
return {
|
|
185718
|
+
executionContext: signature.isScheduler?.(env) ? "scheduler" : "ci",
|
|
185719
|
+
ciProvider: signature.provider
|
|
185720
|
+
};
|
|
185721
|
+
}
|
|
185722
|
+
function detectExecutionContext(options = {}) {
|
|
185723
|
+
const env = options.env ?? currentEnv();
|
|
185724
|
+
const ci = detectCi(env);
|
|
185725
|
+
if (ci)
|
|
185726
|
+
return ci;
|
|
185727
|
+
const agent = options.agent ?? detectAgentFromEnv(env);
|
|
185728
|
+
if (agent) {
|
|
185729
|
+
return { executionContext: "agent" };
|
|
185730
|
+
}
|
|
185731
|
+
const authSignal = options.authSignal ?? authSignalSlot.get();
|
|
185732
|
+
if (authSignal === "service_account") {
|
|
185733
|
+
return { executionContext: "service_account" };
|
|
185734
|
+
}
|
|
185735
|
+
const isTty = options.isTty ?? currentTtyState();
|
|
185736
|
+
if (isTty) {
|
|
185737
|
+
return { executionContext: "manual" };
|
|
185738
|
+
}
|
|
185739
|
+
return { executionContext: "unknown" };
|
|
185740
|
+
}
|
|
185741
|
+
function getExecutionContextTelemetryProperties() {
|
|
185742
|
+
const detected = detectExecutionContext();
|
|
185743
|
+
return {
|
|
185744
|
+
execution_context: detected.executionContext,
|
|
185745
|
+
...detected.ciProvider ? { ci_provider: detected.ciProvider } : {}
|
|
185746
|
+
};
|
|
185747
|
+
}
|
|
185399
185748
|
// ../common/src/telemetry/node-context-storage.ts
|
|
185400
185749
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
185401
185750
|
|
|
@@ -185408,6 +185757,26 @@ class NodeContextStorage {
|
|
|
185408
185757
|
return this.storage.getStore();
|
|
185409
185758
|
}
|
|
185410
185759
|
}
|
|
185760
|
+
// ../common/src/telemetry/session-id.ts
|
|
185761
|
+
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
185762
|
+
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
185763
|
+
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
185764
|
+
function getProcessEnv() {
|
|
185765
|
+
return globalThis.process?.env;
|
|
185766
|
+
}
|
|
185767
|
+
function normalizeSessionId(value) {
|
|
185768
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
185769
|
+
return;
|
|
185770
|
+
}
|
|
185771
|
+
const trimmed = String(value).trim();
|
|
185772
|
+
return trimmed || undefined;
|
|
185773
|
+
}
|
|
185774
|
+
function getConfiguredTelemetrySessionId() {
|
|
185775
|
+
return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
185776
|
+
}
|
|
185777
|
+
function resolveTelemetrySessionId(existingSessionId) {
|
|
185778
|
+
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
185779
|
+
}
|
|
185411
185780
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
185412
185781
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
185413
185782
|
function getGlobalTelemetryProperties() {
|
|
@@ -185492,12 +185861,22 @@ class TelemetryService {
|
|
|
185492
185861
|
return this.contextStorage.getContext();
|
|
185493
185862
|
}
|
|
185494
185863
|
enrichPropertiesWithContext(properties, context) {
|
|
185495
|
-
|
|
185496
|
-
|
|
185864
|
+
const globalProperties = getGlobalTelemetryProperties();
|
|
185865
|
+
const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
|
|
185866
|
+
const sessionId = resolveTelemetrySessionId(existingSessionId);
|
|
185867
|
+
const enriched = {
|
|
185868
|
+
...getExecutionContextTelemetryProperties(),
|
|
185869
|
+
...globalProperties,
|
|
185497
185870
|
...this.defaultProperties,
|
|
185498
185871
|
...properties,
|
|
185499
185872
|
...context
|
|
185500
185873
|
};
|
|
185874
|
+
if (sessionId === undefined) {
|
|
185875
|
+
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
185876
|
+
} else {
|
|
185877
|
+
enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
|
|
185878
|
+
}
|
|
185879
|
+
return enriched;
|
|
185501
185880
|
}
|
|
185502
185881
|
generateId() {
|
|
185503
185882
|
return crypto.randomUUID().replaceAll("-", "");
|
|
@@ -185967,8 +186346,24 @@ var OutputFormatter;
|
|
|
185967
186346
|
data.ErrorCode ??= defaultErrorCodeForFailure(data);
|
|
185968
186347
|
data.Retry ??= defaultRetryForErrorCode(data.ErrorCode);
|
|
185969
186348
|
process.exitCode = EXIT_CODES[data.Result] ?? 1;
|
|
185970
|
-
|
|
185971
|
-
|
|
186349
|
+
recordCommandFailureTelemetry({
|
|
186350
|
+
result: data.Result,
|
|
186351
|
+
errorCode: data.ErrorCode,
|
|
186352
|
+
retry: data.Retry,
|
|
186353
|
+
message: data.Message,
|
|
186354
|
+
context: data.Context,
|
|
186355
|
+
exitCode: process.exitCode,
|
|
186356
|
+
errorClass: data.TelemetryErrorClass,
|
|
186357
|
+
terminalOutcome: data.TelemetryTerminalOutcome,
|
|
186358
|
+
terminalSignal: data.TelemetryTerminalSignal
|
|
186359
|
+
});
|
|
186360
|
+
const suppressTelemetry = data.SuppressTelemetry === true;
|
|
186361
|
+
const envelope = { ...data };
|
|
186362
|
+
delete envelope.SuppressTelemetry;
|
|
186363
|
+
delete envelope.TelemetryErrorClass;
|
|
186364
|
+
delete envelope.TelemetryTerminalOutcome;
|
|
186365
|
+
delete envelope.TelemetryTerminalSignal;
|
|
186366
|
+
if (!suppressTelemetry) {
|
|
185972
186367
|
telemetry.trackEvent(CommonTelemetryEvents.Error, {
|
|
185973
186368
|
result: data.Result,
|
|
185974
186369
|
errorCode: data.ErrorCode,
|
|
@@ -186031,6 +186426,158 @@ var OutputFormatter;
|
|
|
186031
186426
|
OutputFormatter.formatToString = formatToString;
|
|
186032
186427
|
})(OutputFormatter ||= {});
|
|
186033
186428
|
|
|
186429
|
+
// ../common/src/telemetry/command-attribution.ts
|
|
186430
|
+
var LEGACY_SKILL_NAMESPACE = "uipath:";
|
|
186431
|
+
var MAX_SKILL_NAME_LENGTH = 80;
|
|
186432
|
+
var SKILL_NAME_PATTERN = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
186433
|
+
function productMode(productArea, mode) {
|
|
186434
|
+
return { product_area: productArea, mode };
|
|
186435
|
+
}
|
|
186436
|
+
function attributionRecord(groups) {
|
|
186437
|
+
const record = {};
|
|
186438
|
+
for (const [productArea, mode, names] of groups) {
|
|
186439
|
+
const attribution = productMode(productArea, mode);
|
|
186440
|
+
for (const name of names) {
|
|
186441
|
+
record[name] = attribution;
|
|
186442
|
+
}
|
|
186443
|
+
}
|
|
186444
|
+
return record;
|
|
186445
|
+
}
|
|
186446
|
+
function commandAttribution(groups) {
|
|
186447
|
+
const entries = [];
|
|
186448
|
+
for (const [productArea, mode, prefixes] of groups) {
|
|
186449
|
+
const attribution = productMode(productArea, mode);
|
|
186450
|
+
for (const prefix of prefixes) {
|
|
186451
|
+
entries.push({ prefix, attribution });
|
|
186452
|
+
}
|
|
186453
|
+
}
|
|
186454
|
+
return entries;
|
|
186455
|
+
}
|
|
186456
|
+
var SKILL_ATTRIBUTION = attributionRecord([
|
|
186457
|
+
["admin", "operate", ["uipath-admin"]],
|
|
186458
|
+
["agents", "build", ["uipath-agents"]],
|
|
186459
|
+
["api-workflow", "build", ["uipath-api-workflow"]],
|
|
186460
|
+
["automation-discovery", "build", ["uipath-automation-discovery"]],
|
|
186461
|
+
["coded-apps", "build", ["uipath-coded-apps"]],
|
|
186462
|
+
["data-fabric", "operate", ["uipath-data-fabric"]],
|
|
186463
|
+
["cli", "troubleshoot", ["uipath-feedback"]],
|
|
186464
|
+
["governance", "operate", ["uipath-governance"]],
|
|
186465
|
+
["action-center", "build", ["uipath-human-in-the-loop"]],
|
|
186466
|
+
["document-understanding", "build", ["uipath-ixp"]],
|
|
186467
|
+
[
|
|
186468
|
+
"maestro",
|
|
186469
|
+
"build",
|
|
186470
|
+
["uipath-maestro-bpmn", "uipath-maestro-case", "uipath-maestro-flow"]
|
|
186471
|
+
],
|
|
186472
|
+
["agenthub", "build", ["uipath-mcp-servers"]],
|
|
186473
|
+
["solution", "build", ["uipath-planner", "uipath-solution"]],
|
|
186474
|
+
["platform", "operate", ["uipath-platform"]],
|
|
186475
|
+
["quality", "troubleshoot", ["uipath-review"]],
|
|
186476
|
+
["rpa", "build", ["uipath-rpa"]],
|
|
186477
|
+
["cli", "operate", ["uipath-skill-catalog"]],
|
|
186478
|
+
["action-center", "operate", ["uipath-tasks"]],
|
|
186479
|
+
["test-manager", "operate", ["uipath-test"]],
|
|
186480
|
+
["platform", "troubleshoot", ["uipath-troubleshoot"]]
|
|
186481
|
+
]);
|
|
186482
|
+
var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
|
|
186483
|
+
var COMMAND_ATTRIBUTION = commandAttribution([
|
|
186484
|
+
["cli", "troubleshoot", ["uip.feedback"]],
|
|
186485
|
+
["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
|
|
186486
|
+
["context-grounding", "build", ["uip.context-grounding"]],
|
|
186487
|
+
["api-workflow", "build", ["uip.api-workflow"]],
|
|
186488
|
+
["rpa", "build", ["uip.rpa-legacy"]],
|
|
186489
|
+
["conversational", "operate", ["uip.conversational"]],
|
|
186490
|
+
["agents", "build", ["uip.codedagent", "uip.agent"]],
|
|
186491
|
+
["agenthub", "build", ["uip.agenthub"]],
|
|
186492
|
+
["coded-apps", "build", ["uip.codedapp"]],
|
|
186493
|
+
["functions", "build", ["uip.functions"]],
|
|
186494
|
+
["solution", "build", ["uip.solution"]],
|
|
186495
|
+
["maestro", "build", ["uip.maestro", "uip.case", "uip.flow"]],
|
|
186496
|
+
["llm-observability", "troubleshoot", ["uip.traces"]],
|
|
186497
|
+
["platform", "operate", ["uip.platform"]],
|
|
186498
|
+
["admin", "operate", ["uip.admin"]],
|
|
186499
|
+
["automation-ops", "operate", ["uip.aops"]],
|
|
186500
|
+
["documentation", "troubleshoot", ["uip.docsai"]],
|
|
186501
|
+
["governance", "operate", ["uip.gov"]],
|
|
186502
|
+
["insights", "operate", ["uip.insights"]],
|
|
186503
|
+
["document-understanding", "build", ["uip.ixp"]],
|
|
186504
|
+
["process-mining", "operate", ["uip.pm"]],
|
|
186505
|
+
["action-center", "operate", ["uip.tasks"]],
|
|
186506
|
+
["test-manager", "operate", ["uip.tm"]],
|
|
186507
|
+
["vertical-solutions", "build", ["uip.vss"]],
|
|
186508
|
+
["data-fabric", "operate", ["uip.df"]],
|
|
186509
|
+
["integration-service", "build", ["uip.is"]],
|
|
186510
|
+
["orchestrator", "operate", ["uip.or"]],
|
|
186511
|
+
[
|
|
186512
|
+
"cli",
|
|
186513
|
+
"operate",
|
|
186514
|
+
[
|
|
186515
|
+
"uip.login",
|
|
186516
|
+
"uip.logout",
|
|
186517
|
+
"uip.user",
|
|
186518
|
+
"uip.config",
|
|
186519
|
+
"uip.tools",
|
|
186520
|
+
"uip.skills",
|
|
186521
|
+
"uip.completion",
|
|
186522
|
+
"uip.update",
|
|
186523
|
+
"uip.mcp",
|
|
186524
|
+
"uip.track"
|
|
186525
|
+
]
|
|
186526
|
+
]
|
|
186527
|
+
]).sort((a, b) => b.prefix.length - a.prefix.length);
|
|
186528
|
+
function normalizeCommandPath(value) {
|
|
186529
|
+
if (typeof value !== "string") {
|
|
186530
|
+
return;
|
|
186531
|
+
}
|
|
186532
|
+
const trimmed = value.trim().toLowerCase();
|
|
186533
|
+
if (!trimmed) {
|
|
186534
|
+
return;
|
|
186535
|
+
}
|
|
186536
|
+
const tokens = trimmed.includes(" ") ? trimmed.split(/\s+/).filter((token) => token.length > 0).filter((token) => !token.startsWith("-")) : trimmed.split(".").filter((token) => token.length > 0);
|
|
186537
|
+
if (tokens.length === 0) {
|
|
186538
|
+
return;
|
|
186539
|
+
}
|
|
186540
|
+
const commandTokens = tokens[0] === "uip" ? tokens : ["uip", ...tokens];
|
|
186541
|
+
return commandTokens.join(".");
|
|
186542
|
+
}
|
|
186543
|
+
function getCommandProductModeAttribution(commandPath) {
|
|
186544
|
+
const normalized = normalizeCommandPath(commandPath);
|
|
186545
|
+
if (!normalized) {
|
|
186546
|
+
return;
|
|
186547
|
+
}
|
|
186548
|
+
return COMMAND_ATTRIBUTION.find(({ prefix }) => normalized === prefix || normalized.startsWith(`${prefix}.`))?.attribution;
|
|
186549
|
+
}
|
|
186550
|
+
function normalizeSkillNameWithOptions(value, options) {
|
|
186551
|
+
if (typeof value !== "string") {
|
|
186552
|
+
return;
|
|
186553
|
+
}
|
|
186554
|
+
const normalized = value.trim().toLowerCase();
|
|
186555
|
+
if (!normalized) {
|
|
186556
|
+
return;
|
|
186557
|
+
}
|
|
186558
|
+
const hasLegacyNamespace = normalized.startsWith(LEGACY_SKILL_NAMESPACE);
|
|
186559
|
+
if (hasLegacyNamespace && !options.allowLegacyNamespace) {
|
|
186560
|
+
return;
|
|
186561
|
+
}
|
|
186562
|
+
const skillName = hasLegacyNamespace ? normalized.slice(LEGACY_SKILL_NAMESPACE.length) : normalized;
|
|
186563
|
+
if (skillName.length > MAX_SKILL_NAME_LENGTH || !SKILL_NAME_PATTERN.test(skillName) || !KNOWN_SKILL_NAMES.has(skillName)) {
|
|
186564
|
+
return;
|
|
186565
|
+
}
|
|
186566
|
+
return skillName;
|
|
186567
|
+
}
|
|
186568
|
+
function normalizeSkillName(value) {
|
|
186569
|
+
return normalizeSkillNameWithOptions(value, {
|
|
186570
|
+
allowLegacyNamespace: false
|
|
186571
|
+
});
|
|
186572
|
+
}
|
|
186573
|
+
function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
186574
|
+
const skillName = normalizeSkillName(skillSource);
|
|
186575
|
+
return {
|
|
186576
|
+
...skillName ? { skill_name: skillName } : {},
|
|
186577
|
+
...getCommandProductModeAttribution(commandPath)
|
|
186578
|
+
};
|
|
186579
|
+
}
|
|
186580
|
+
|
|
186034
186581
|
// ../common/src/telemetry/pii-redactor.ts
|
|
186035
186582
|
var REDACTED = "[REDACTED]";
|
|
186036
186583
|
var MAX_VALUE_LENGTH = 200;
|
|
@@ -186208,6 +186755,12 @@ function commandHelpHint(commandPath) {
|
|
|
186208
186755
|
const command = commandPath.replace(/\./g, " ");
|
|
186209
186756
|
return `An unexpected error occurred. Run '${command} --help' to verify command syntax, or run with --log-level debug for details.`;
|
|
186210
186757
|
}
|
|
186758
|
+
function isPromptCancellation(error) {
|
|
186759
|
+
return error instanceof Error && error.name === "ExitPromptError";
|
|
186760
|
+
}
|
|
186761
|
+
function exitCodeFromProcess(fallback) {
|
|
186762
|
+
return typeof process.exitCode === "number" ? process.exitCode : fallback;
|
|
186763
|
+
}
|
|
186211
186764
|
Command.prototype.trackedAction = function(context, fn, properties) {
|
|
186212
186765
|
const command = this;
|
|
186213
186766
|
return this.action(async (...args) => {
|
|
@@ -186215,6 +186768,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
186215
186768
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
186216
186769
|
const startTime = performance.now();
|
|
186217
186770
|
let errorMessage2;
|
|
186771
|
+
let fallbackExitCode = EXIT_CODES.Success;
|
|
186772
|
+
clearRecordedCommandFailureTelemetry();
|
|
186218
186773
|
const [error] = await catchError2(fn(...args));
|
|
186219
186774
|
if (error) {
|
|
186220
186775
|
errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
@@ -186229,6 +186784,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
186229
186784
|
const customRetry = isRetryHint(typedRetry) ? typedRetry : undefined;
|
|
186230
186785
|
const typedContext = typed.context ?? typed.Context;
|
|
186231
186786
|
const customContext = isErrorContext(typedContext) ? typedContext : undefined;
|
|
186787
|
+
const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation(error) ? 130 : undefined;
|
|
186788
|
+
fallbackExitCode = cancellationExitCode ?? EXIT_CODES[finalResult];
|
|
186232
186789
|
OutputFormatter.error({
|
|
186233
186790
|
Result: finalResult,
|
|
186234
186791
|
...customErrorCode ? { ErrorCode: customErrorCode } : {},
|
|
@@ -186237,16 +186794,26 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
186237
186794
|
...customRetry ? { Retry: customRetry } : {},
|
|
186238
186795
|
...customContext ? { Context: customContext } : {}
|
|
186239
186796
|
});
|
|
186240
|
-
context.exit(
|
|
186797
|
+
context.exit(fallbackExitCode);
|
|
186241
186798
|
}
|
|
186242
186799
|
const durationMs = performance.now() - startTime;
|
|
186243
|
-
const
|
|
186800
|
+
const exitCode = fallbackExitCode === 130 ? fallbackExitCode : exitCodeFromProcess(fallbackExitCode);
|
|
186801
|
+
const recordedFailure = takeRecordedCommandFailureTelemetry();
|
|
186802
|
+
const success = !error && exitCode === 0;
|
|
186803
|
+
const terminalTelemetry = buildCommandTerminalTelemetryProperties({
|
|
186804
|
+
error,
|
|
186805
|
+
exitCode,
|
|
186806
|
+
recordedFailure,
|
|
186807
|
+
pollSignal: context.pollSignal
|
|
186808
|
+
});
|
|
186244
186809
|
telemetry.trackEvent(telemetryName, redactProperties({
|
|
186245
186810
|
...extractCommandParams(command),
|
|
186246
186811
|
...props,
|
|
186812
|
+
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
186247
186813
|
command: "true",
|
|
186248
186814
|
duration: String(durationMs),
|
|
186249
186815
|
success: String(success),
|
|
186816
|
+
...terminalTelemetry,
|
|
186250
186817
|
...errorMessage2 ? { errorMessage: errorMessage2 } : {}
|
|
186251
186818
|
}));
|
|
186252
186819
|
});
|
|
@@ -186387,6 +186954,8 @@ function installRequestHeaderForwarding(BaseApiClass, patchKey, forward) {
|
|
|
186387
186954
|
function installSdkUserAgentHeader(BaseApiClass, userAgent) {
|
|
186388
186955
|
installRequestHeaderForwarding(BaseApiClass, userAgentPatchKey(userAgent), (headers) => addSdkUserAgentHeader(headers, userAgent));
|
|
186389
186956
|
}
|
|
186957
|
+
// ../common/src/telemetry/ship-succeeded.ts
|
|
186958
|
+
var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
|
|
186390
186959
|
// ../common/src/tool-provider.ts
|
|
186391
186960
|
var factorySlot = singleton("PackagerFactoryProvider");
|
|
186392
186961
|
// src/services/flow-validate-service.ts
|
|
@@ -210553,7 +211122,7 @@ function querystringSingleKey(key, value, keyPrefix = "") {
|
|
|
210553
211122
|
var package_default = {
|
|
210554
211123
|
name: "@uipath/solution-sdk",
|
|
210555
211124
|
license: "MIT",
|
|
210556
|
-
version: "1.197.0-preview.
|
|
211125
|
+
version: "1.197.0-preview.67",
|
|
210557
211126
|
repository: {
|
|
210558
211127
|
type: "git",
|
|
210559
211128
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -210605,7 +211174,7 @@ var package_default = {
|
|
|
210605
211174
|
var SDK_USER_AGENT = getSdkUserAgentToken(package_default);
|
|
210606
211175
|
installSdkUserAgentHeader(BaseAPI, SDK_USER_AGENT);
|
|
210607
211176
|
// ../solution-sdk/src/solution-file.ts
|
|
210608
|
-
function
|
|
211177
|
+
function isRecord2(value) {
|
|
210609
211178
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
210610
211179
|
}
|
|
210611
211180
|
async function findNearestParentUipxFile(fs7, projectDir) {
|
|
@@ -210662,7 +211231,7 @@ async function readSolutionManifest(fs7, solutionFile) {
|
|
|
210662
211231
|
null
|
|
210663
211232
|
];
|
|
210664
211233
|
}
|
|
210665
|
-
if (!
|
|
211234
|
+
if (!isRecord2(parsed)) {
|
|
210666
211235
|
return [
|
|
210667
211236
|
new Error(`Invalid solution file: ${solutionFile} must contain a JSON object.`),
|
|
210668
211237
|
null
|
|
@@ -210676,7 +211245,7 @@ async function readSolutionManifest(fs7, solutionFile) {
|
|
|
210676
211245
|
}
|
|
210677
211246
|
const projects = [];
|
|
210678
211247
|
for (const [index, project] of parsed.Projects.entries()) {
|
|
210679
|
-
if (!
|
|
211248
|
+
if (!isRecord2(project)) {
|
|
210680
211249
|
return [
|
|
210681
211250
|
new Error(`Invalid solution file: Projects[${index}] must be an object.`),
|
|
210682
211251
|
null
|
|
@@ -215157,7 +215726,7 @@ class TextApiResponse2 {
|
|
|
215157
215726
|
var package_default2 = {
|
|
215158
215727
|
name: "@uipath/integrationservice-sdk",
|
|
215159
215728
|
license: "MIT",
|
|
215160
|
-
version: "1.197.0-preview.
|
|
215729
|
+
version: "1.197.0-preview.67",
|
|
215161
215730
|
repository: {
|
|
215162
215731
|
type: "git",
|
|
215163
215732
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -223586,7 +224155,7 @@ init_dist2();
|
|
|
223586
224155
|
// ../packager/packager-tool-flow/package.json
|
|
223587
224156
|
var package_default4 = {
|
|
223588
224157
|
name: "@uipath/packager-tool-flow",
|
|
223589
|
-
version: "1.197.0-preview.
|
|
224158
|
+
version: "1.197.0-preview.67",
|
|
223590
224159
|
description: "UiPath Flow tool implementation",
|
|
223591
224160
|
type: "module",
|
|
223592
224161
|
exports: {
|
|
@@ -238871,4 +239440,4 @@ export {
|
|
|
238871
239440
|
FlowValidateService
|
|
238872
239441
|
};
|
|
238873
239442
|
|
|
238874
|
-
//# debugId=
|
|
239443
|
+
//# debugId=497D0553B7FDF5A764756E2164756E21
|