@uipath/ixp-tool 1.203.0-preview.203 → 1.204.0-preview.206
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/index.js +1 -1
- package/dist/{tool-nfkkr38f.js → tool-g95vn0xg.js} +625 -130
- package/dist/tool.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2101,7 +2101,7 @@ var package_default = {
|
|
|
2101
2101
|
name: "@uipath/ixp-tool",
|
|
2102
2102
|
author: "UiPath",
|
|
2103
2103
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
2104
|
-
version: "1.
|
|
2104
|
+
version: "1.204.0-preview.206",
|
|
2105
2105
|
description: "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
|
|
2106
2106
|
private: false,
|
|
2107
2107
|
repository: {
|
|
@@ -2911,9 +2911,60 @@ function settlePromiseLike(thenable) {
|
|
|
2911
2911
|
return Promise.resolve(thenable).then((data) => [undefined, data]).catch((error) => [toError(error), undefined]);
|
|
2912
2912
|
}
|
|
2913
2913
|
|
|
2914
|
+
// ../common/src/error-graph.ts
|
|
2915
|
+
function* walkErrorGraph(error) {
|
|
2916
|
+
const queue = [error];
|
|
2917
|
+
const seen = new Set;
|
|
2918
|
+
for (let steps = 0;queue.length > 0 && steps < 32; steps++) {
|
|
2919
|
+
const current = queue.shift();
|
|
2920
|
+
if (current === null || typeof current !== "object")
|
|
2921
|
+
continue;
|
|
2922
|
+
if (seen.has(current))
|
|
2923
|
+
continue;
|
|
2924
|
+
seen.add(current);
|
|
2925
|
+
const cur = current;
|
|
2926
|
+
yield cur;
|
|
2927
|
+
if (cur.cause !== undefined)
|
|
2928
|
+
queue.push(cur.cause);
|
|
2929
|
+
if (Array.isArray(cur.errors))
|
|
2930
|
+
queue.push(...cur.errors);
|
|
2931
|
+
}
|
|
2932
|
+
return;
|
|
2933
|
+
}
|
|
2934
|
+
function parseHttpStatusFromMessage(message) {
|
|
2935
|
+
const match = /^HTTP\s+(\d{3})(?::|\s|-|$)/i.exec(message.trim());
|
|
2936
|
+
if (!match)
|
|
2937
|
+
return;
|
|
2938
|
+
const status = Number(match[1]);
|
|
2939
|
+
return Number.isInteger(status) && status >= 100 && status <= 599 ? status : undefined;
|
|
2940
|
+
}
|
|
2941
|
+
function findHttpStatusInGraph(error) {
|
|
2942
|
+
for (const node of walkErrorGraph(error)) {
|
|
2943
|
+
const response = node.response;
|
|
2944
|
+
const explicit = typeof node.status === "number" ? node.status : response?.status;
|
|
2945
|
+
if (typeof explicit === "number" && explicit >= 400 && explicit <= 599) {
|
|
2946
|
+
return explicit;
|
|
2947
|
+
}
|
|
2948
|
+
if (typeof node.message === "string") {
|
|
2949
|
+
const parsed = parseHttpStatusFromMessage(node.message);
|
|
2950
|
+
if (parsed !== undefined && parsed >= 400) {
|
|
2951
|
+
return parsed;
|
|
2952
|
+
}
|
|
2953
|
+
}
|
|
2954
|
+
}
|
|
2955
|
+
return;
|
|
2956
|
+
}
|
|
2957
|
+
|
|
2958
|
+
// ../common/src/local-permission-codes.ts
|
|
2959
|
+
var LOCAL_PERMISSION_ERROR_CODES = new Set([
|
|
2960
|
+
"EACCES",
|
|
2961
|
+
"EPERM",
|
|
2962
|
+
"EROFS"
|
|
2963
|
+
]);
|
|
2964
|
+
|
|
2914
2965
|
// ../common/src/error-handler.ts
|
|
2915
|
-
var DEFAULT_401 = "Unauthorized (401). Run `uip login` to
|
|
2916
|
-
var DEFAULT_403 = "Forbidden (403).
|
|
2966
|
+
var DEFAULT_401 = "Unauthorized (401). The session is missing or expired, or its token carries no scope for this API. Run `uip login status --detailed` to see the session and its scopes.";
|
|
2967
|
+
var DEFAULT_403 = "Forbidden (403). The account lacks permission for this operation, or the token carries no scope for this API. Run `uip login status --detailed` to see the token's scopes.";
|
|
2917
2968
|
var DEFAULT_405 = "Method Not Allowed (405). The endpoint may not exist or the base URL may be incorrect.";
|
|
2918
2969
|
var DEFAULT_413 = "Payload too large (413). The upload exceeded the server or CDN size limit. Reduce the package size — for example, exclude unused dependencies or remove large files from the project — and try again.";
|
|
2919
2970
|
var HTML_RESPONSE_MESSAGE = "Received HTML instead of the expected JSON response.";
|
|
@@ -2940,14 +2991,14 @@ var TLS_ERROR_CODES = new Set([
|
|
|
2940
2991
|
]);
|
|
2941
2992
|
var TLS_INSTRUCTIONS = "The server's TLS certificate could not be verified. Most often a " + "corporate proxy/firewall re-signs HTTPS with a root CA that Node does " + "not trust — set NODE_EXTRA_CA_CERTS to that CA's PEM file (and HTTPS_PROXY " + "if you connect through a proxy). If the certificate is instead expired or " + "its hostname does not match, fix the endpoint URL or the system clock. " + "Then retry.";
|
|
2942
2993
|
var NETWORK_INSTRUCTIONS = "Could not reach the UiPath service. Check your network connection and " + "VPN, confirm any HTTP_PROXY/HTTPS_PROXY/NO_PROXY settings are correct, " + "then retry.";
|
|
2943
|
-
var
|
|
2944
|
-
var LOCAL_PERMISSION_MESSAGE_PATTERN = /\b(EACCES|EPERM|EROFS)\b/;
|
|
2994
|
+
var LOCAL_PERMISSION_MESSAGE_PATTERN = new RegExp(`\\b(${[...LOCAL_PERMISSION_ERROR_CODES].join("|")})\\b`);
|
|
2945
2995
|
function localPermissionInstructions(code, path2) {
|
|
2946
2996
|
const target = path2 !== undefined ? `'${path2}'` : "a local file or resource";
|
|
2947
2997
|
if (code === "EROFS") {
|
|
2948
2998
|
return `The filesystem containing ${target} is read-only (EROFS), so the ` + "CLI could not write to it. This is a local environment problem, " + "not a UiPath service error — retrying will not help. Use a " + "writable location, or give this environment write access to the " + "path.";
|
|
2949
2999
|
}
|
|
2950
|
-
const
|
|
3000
|
+
const onWindows = typeof process !== "undefined" && process.platform === "win32";
|
|
3001
|
+
const remedy = onWindows ? "Re-run from an elevated terminal, close any program holding " + "the file open, or grant your user access to the path." : "Grant this user (or the sandbox the command runs in) access " + "to the path, or run the command outside the sandbox.";
|
|
2951
3002
|
return `The operating system denied access to ${target} (${code}). This is ` + "a local permission problem, not a UiPath service error — retrying " + `without a permission change will not help. ${remedy}`;
|
|
2952
3003
|
}
|
|
2953
3004
|
function describeConnectivityError(error) {
|
|
@@ -3001,48 +3052,6 @@ function localPermissionPath(path2, message) {
|
|
|
3001
3052
|
return path2;
|
|
3002
3053
|
return message ? /'([^']+)'/.exec(message)?.[1] : undefined;
|
|
3003
3054
|
}
|
|
3004
|
-
function* walkErrorGraph(error) {
|
|
3005
|
-
const queue = [error];
|
|
3006
|
-
const seen = new Set;
|
|
3007
|
-
for (let steps = 0;queue.length > 0 && steps < 32; steps++) {
|
|
3008
|
-
const current = queue.shift();
|
|
3009
|
-
if (current === null || typeof current !== "object")
|
|
3010
|
-
continue;
|
|
3011
|
-
if (seen.has(current))
|
|
3012
|
-
continue;
|
|
3013
|
-
seen.add(current);
|
|
3014
|
-
const cur = current;
|
|
3015
|
-
yield cur;
|
|
3016
|
-
if (cur.cause !== undefined)
|
|
3017
|
-
queue.push(cur.cause);
|
|
3018
|
-
if (Array.isArray(cur.errors))
|
|
3019
|
-
queue.push(...cur.errors);
|
|
3020
|
-
}
|
|
3021
|
-
return;
|
|
3022
|
-
}
|
|
3023
|
-
function parseHttpStatusFromMessage(message) {
|
|
3024
|
-
const match = /^HTTP\s+(\d{3})(?::|\s|-|$)/i.exec(message.trim());
|
|
3025
|
-
if (!match)
|
|
3026
|
-
return;
|
|
3027
|
-
const status = Number(match[1]);
|
|
3028
|
-
return Number.isInteger(status) && status >= 100 && status <= 599 ? status : undefined;
|
|
3029
|
-
}
|
|
3030
|
-
function findHttpStatusInGraph(error) {
|
|
3031
|
-
for (const node of walkErrorGraph(error)) {
|
|
3032
|
-
const response = node.response;
|
|
3033
|
-
const explicit = typeof node.status === "number" ? node.status : response?.status;
|
|
3034
|
-
if (typeof explicit === "number" && explicit >= 400 && explicit <= 599) {
|
|
3035
|
-
return explicit;
|
|
3036
|
-
}
|
|
3037
|
-
if (typeof node.message === "string") {
|
|
3038
|
-
const parsed = parseHttpStatusFromMessage(node.message);
|
|
3039
|
-
if (parsed !== undefined && parsed >= 400) {
|
|
3040
|
-
return parsed;
|
|
3041
|
-
}
|
|
3042
|
-
}
|
|
3043
|
-
}
|
|
3044
|
-
return;
|
|
3045
|
-
}
|
|
3046
3055
|
function isHtmlDocument(body) {
|
|
3047
3056
|
return /^\s*(<!doctype html|<html\b)/i.test(body);
|
|
3048
3057
|
}
|
|
@@ -3560,12 +3569,162 @@ function getOutputFilter() {
|
|
|
3560
3569
|
return filterSlot.get();
|
|
3561
3570
|
}
|
|
3562
3571
|
|
|
3572
|
+
// ../common/src/telemetry/telemetry-dimensions.ts
|
|
3573
|
+
var BaseDimensions = {
|
|
3574
|
+
ApplicationName: "ApplicationName",
|
|
3575
|
+
ProductVersion: "ProductVersion",
|
|
3576
|
+
InstallationId: "InstallationId",
|
|
3577
|
+
CloudUserId: "CloudUserId",
|
|
3578
|
+
CloudTenantId: "CloudTenantId",
|
|
3579
|
+
CloudOrganizationId: "CloudOrganizationId",
|
|
3580
|
+
IsInternalUser: "IsInternalUser",
|
|
3581
|
+
Environment: "Environment",
|
|
3582
|
+
BaseUrl: "BaseUrl",
|
|
3583
|
+
Region: "Region",
|
|
3584
|
+
Agent: "Agent",
|
|
3585
|
+
AgentVersion: "AgentVersion",
|
|
3586
|
+
AgentModel: "AgentModel",
|
|
3587
|
+
ToolName: "ToolName",
|
|
3588
|
+
ToolVersion: "ToolVersion",
|
|
3589
|
+
ExecutionContext: "ExecutionContext",
|
|
3590
|
+
CiProvider: "CiProvider",
|
|
3591
|
+
SessionIdSource: "SessionIdSource",
|
|
3592
|
+
SessionId: "SessionId"
|
|
3593
|
+
};
|
|
3594
|
+
var CommandDimensions = {
|
|
3595
|
+
IsCommand: "IsCommand",
|
|
3596
|
+
IsReexec: "IsReexec",
|
|
3597
|
+
CommandName: "CommandName",
|
|
3598
|
+
ExitCode: "ExitCode",
|
|
3599
|
+
TerminalOutcome: "TerminalOutcome",
|
|
3600
|
+
ErrorClass: "ErrorClass",
|
|
3601
|
+
TerminalSignal: "TerminalSignal",
|
|
3602
|
+
ErrorMessage: "ErrorMessage",
|
|
3603
|
+
SkillName: "SkillName",
|
|
3604
|
+
ProductArea: "ProductArea",
|
|
3605
|
+
Mode: "Mode"
|
|
3606
|
+
};
|
|
3607
|
+
var ShipDimensions = {
|
|
3608
|
+
ShipKind: "ShipKind",
|
|
3609
|
+
Target: "Target",
|
|
3610
|
+
ProjectType: "ProjectType",
|
|
3611
|
+
ProjectTypes: "ProjectTypes",
|
|
3612
|
+
ArtifactCorrelationKey: "ArtifactCorrelationKey",
|
|
3613
|
+
PackageName: "PackageName",
|
|
3614
|
+
PackageVersion: "PackageVersion",
|
|
3615
|
+
PackageVersionKey: "PackageVersionKey",
|
|
3616
|
+
DeploymentKey: "DeploymentKey",
|
|
3617
|
+
SolutionId: "SolutionId",
|
|
3618
|
+
FolderKey: "FolderKey",
|
|
3619
|
+
FeedId: "FeedId"
|
|
3620
|
+
};
|
|
3621
|
+
var ErrorDimensions = {
|
|
3622
|
+
Result: "Result",
|
|
3623
|
+
ErrorCode: "ErrorCode",
|
|
3624
|
+
Retry: "Retry",
|
|
3625
|
+
ErrorMessage: "ErrorMessage"
|
|
3626
|
+
};
|
|
3627
|
+
var AuthDimensions = {
|
|
3628
|
+
AuthenticationMethod: "AuthenticationMethod",
|
|
3629
|
+
Success: "Success",
|
|
3630
|
+
Reason: "Reason"
|
|
3631
|
+
};
|
|
3632
|
+
var SkillsDimensions = {
|
|
3633
|
+
SchemaVersion: "SchemaVersion",
|
|
3634
|
+
AgentType: "AgentType",
|
|
3635
|
+
SkillsVersion: "SkillsVersion",
|
|
3636
|
+
UipSubcommand: "UipSubcommand",
|
|
3637
|
+
FileExtension: "FileExtension",
|
|
3638
|
+
SubagentModel: "SubagentModel",
|
|
3639
|
+
SubagentType: "SubagentType",
|
|
3640
|
+
PermissionMode: "PermissionMode",
|
|
3641
|
+
EffortLevel: "EffortLevel",
|
|
3642
|
+
SessionSource: "SessionSource",
|
|
3643
|
+
Outcome: "Outcome",
|
|
3644
|
+
DurationMs: "DurationMs",
|
|
3645
|
+
Source: "Source"
|
|
3646
|
+
};
|
|
3647
|
+
var PackagerDimensions = {
|
|
3648
|
+
ProjectId: "ProjectId",
|
|
3649
|
+
ProjectType: "ProjectType",
|
|
3650
|
+
SolutionId: "SolutionId"
|
|
3651
|
+
};
|
|
3652
|
+
var ScopeDimensions = {
|
|
3653
|
+
FolderId: "FolderId"
|
|
3654
|
+
};
|
|
3655
|
+
var ID_DIMENSIONS = new Set([
|
|
3656
|
+
BaseDimensions.CloudUserId,
|
|
3657
|
+
BaseDimensions.CloudTenantId,
|
|
3658
|
+
BaseDimensions.CloudOrganizationId,
|
|
3659
|
+
BaseDimensions.InstallationId,
|
|
3660
|
+
ShipDimensions.ArtifactCorrelationKey,
|
|
3661
|
+
ShipDimensions.PackageVersionKey,
|
|
3662
|
+
ShipDimensions.DeploymentKey,
|
|
3663
|
+
ShipDimensions.SolutionId,
|
|
3664
|
+
ShipDimensions.FolderKey,
|
|
3665
|
+
ShipDimensions.FeedId,
|
|
3666
|
+
PackagerDimensions.ProjectId
|
|
3667
|
+
]);
|
|
3668
|
+
var NON_IDENTIFIER_PLACEHOLDER_PATTERN = /^(?:\[[A-Z_]+\]|<[^>]+>)$/;
|
|
3669
|
+
var RESERVED_DIMENSION_NAMES = new Set([
|
|
3670
|
+
...Object.values(BaseDimensions),
|
|
3671
|
+
...Object.values(CommandDimensions),
|
|
3672
|
+
...Object.values(ShipDimensions),
|
|
3673
|
+
...Object.values(ErrorDimensions),
|
|
3674
|
+
...Object.values(AuthDimensions),
|
|
3675
|
+
...Object.values(SkillsDimensions),
|
|
3676
|
+
...Object.values(PackagerDimensions),
|
|
3677
|
+
...Object.values(ScopeDimensions)
|
|
3678
|
+
]);
|
|
3679
|
+
var CURATED_DIMENSIONS = new Set([
|
|
3680
|
+
BaseDimensions.ApplicationName,
|
|
3681
|
+
BaseDimensions.ProductVersion,
|
|
3682
|
+
BaseDimensions.InstallationId,
|
|
3683
|
+
BaseDimensions.CloudUserId,
|
|
3684
|
+
BaseDimensions.CloudTenantId,
|
|
3685
|
+
BaseDimensions.CloudOrganizationId,
|
|
3686
|
+
BaseDimensions.IsInternalUser,
|
|
3687
|
+
BaseDimensions.Environment,
|
|
3688
|
+
BaseDimensions.BaseUrl,
|
|
3689
|
+
BaseDimensions.Region,
|
|
3690
|
+
BaseDimensions.Agent,
|
|
3691
|
+
BaseDimensions.AgentVersion,
|
|
3692
|
+
BaseDimensions.ToolVersion,
|
|
3693
|
+
BaseDimensions.ExecutionContext,
|
|
3694
|
+
BaseDimensions.CiProvider,
|
|
3695
|
+
BaseDimensions.SessionIdSource,
|
|
3696
|
+
BaseDimensions.SessionId,
|
|
3697
|
+
...Object.values(CommandDimensions),
|
|
3698
|
+
...Object.values(ShipDimensions)
|
|
3699
|
+
]);
|
|
3700
|
+
function lowercaseIdDimensionValues(properties) {
|
|
3701
|
+
let changed = false;
|
|
3702
|
+
const result = {
|
|
3703
|
+
...properties
|
|
3704
|
+
};
|
|
3705
|
+
for (const key of Object.keys(result)) {
|
|
3706
|
+
const value = result[key];
|
|
3707
|
+
if (!ID_DIMENSIONS.has(key) || typeof value !== "string" || NON_IDENTIFIER_PLACEHOLDER_PATTERN.test(value)) {
|
|
3708
|
+
continue;
|
|
3709
|
+
}
|
|
3710
|
+
const lowered = value.toLowerCase();
|
|
3711
|
+
if (lowered !== value) {
|
|
3712
|
+
result[key] = lowered;
|
|
3713
|
+
changed = true;
|
|
3714
|
+
}
|
|
3715
|
+
}
|
|
3716
|
+
return changed ? result : properties;
|
|
3717
|
+
}
|
|
3718
|
+
|
|
3563
3719
|
// ../common/src/telemetry/command-terminal.ts
|
|
3564
3720
|
var recordedFailureSlot = singleton("CommandTelemetryFailure");
|
|
3565
3721
|
var AUTH_ERROR_CODES = new Set([
|
|
3566
3722
|
"authentication_required",
|
|
3567
3723
|
"permission_denied"
|
|
3568
3724
|
]);
|
|
3725
|
+
var LOCAL_PERMISSION_CLI_ERROR_CODES = new Set([
|
|
3726
|
+
"local_permission_denied"
|
|
3727
|
+
]);
|
|
3569
3728
|
var VALIDATION_ERROR_CODES = new Set(["invalid_argument"]);
|
|
3570
3729
|
var NETWORK_HTTP_ERROR_CODES = new Set([
|
|
3571
3730
|
"network_error",
|
|
@@ -3706,6 +3865,9 @@ function classifyFromErrorCode(errorCode) {
|
|
|
3706
3865
|
if (AUTH_ERROR_CODES.has(errorCode)) {
|
|
3707
3866
|
return "auth";
|
|
3708
3867
|
}
|
|
3868
|
+
if (LOCAL_PERMISSION_CLI_ERROR_CODES.has(errorCode)) {
|
|
3869
|
+
return "local_permission";
|
|
3870
|
+
}
|
|
3709
3871
|
if (VALIDATION_ERROR_CODES.has(errorCode)) {
|
|
3710
3872
|
return "validation";
|
|
3711
3873
|
}
|
|
@@ -3717,6 +3879,15 @@ function classifyFromErrorCode(errorCode) {
|
|
|
3717
3879
|
}
|
|
3718
3880
|
return;
|
|
3719
3881
|
}
|
|
3882
|
+
function hasLocalPermissionCode(error) {
|
|
3883
|
+
for (const node of walkErrorGraph(error)) {
|
|
3884
|
+
const code = node.code;
|
|
3885
|
+
if (typeof code === "string" && LOCAL_PERMISSION_ERROR_CODES.has(code)) {
|
|
3886
|
+
return true;
|
|
3887
|
+
}
|
|
3888
|
+
}
|
|
3889
|
+
return false;
|
|
3890
|
+
}
|
|
3720
3891
|
function classifyFromError(error) {
|
|
3721
3892
|
const code = findCodeInCauseChain(error);
|
|
3722
3893
|
if (code) {
|
|
@@ -3733,6 +3904,9 @@ function classifyFromError(error) {
|
|
|
3733
3904
|
return "missing_dependency";
|
|
3734
3905
|
}
|
|
3735
3906
|
}
|
|
3907
|
+
if (hasLocalPermissionCode(error)) {
|
|
3908
|
+
return "local_permission";
|
|
3909
|
+
}
|
|
3736
3910
|
const message = stringField(error, "message");
|
|
3737
3911
|
if (message?.includes("fetch failed") === true) {
|
|
3738
3912
|
return "network_http";
|
|
@@ -3748,7 +3922,7 @@ function classifyError2(input) {
|
|
|
3748
3922
|
if (recorded?.errorClass) {
|
|
3749
3923
|
return recorded.errorClass;
|
|
3750
3924
|
}
|
|
3751
|
-
const status = recorded?.context?.httpStatus;
|
|
3925
|
+
const status = recorded?.context?.httpStatus ?? findHttpStatusInGraph(input.error);
|
|
3752
3926
|
if (status !== undefined) {
|
|
3753
3927
|
return classifyHttpStatus(status);
|
|
3754
3928
|
}
|
|
@@ -3771,17 +3945,18 @@ function buildCommandTerminalTelemetryProperties(input) {
|
|
|
3771
3945
|
const errorClass = outcome === "success" || outcome === "no_op" ? undefined : outcome === "cancelled" ? "user_cancelled" : classifyError2(input);
|
|
3772
3946
|
const terminalSignal = terminalSignalFor(input, outcome);
|
|
3773
3947
|
return {
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
...errorClass ? {
|
|
3777
|
-
...terminalSignal ? {
|
|
3948
|
+
[CommandDimensions.ExitCode]: input.exitCode,
|
|
3949
|
+
[CommandDimensions.TerminalOutcome]: outcome,
|
|
3950
|
+
...errorClass ? { [CommandDimensions.ErrorClass]: errorClass } : {},
|
|
3951
|
+
...terminalSignal ? { [CommandDimensions.TerminalSignal]: terminalSignal } : {}
|
|
3778
3952
|
};
|
|
3779
3953
|
}
|
|
3780
3954
|
|
|
3781
3955
|
// ../common/src/telemetry/telemetry-events.ts
|
|
3782
3956
|
var CommonTelemetryEvents = {
|
|
3783
|
-
|
|
3784
|
-
|
|
3957
|
+
Start: "Application.Start",
|
|
3958
|
+
Error: "Application.Error",
|
|
3959
|
+
ShipSucceeded: "Cli.ShipSucceeded"
|
|
3785
3960
|
};
|
|
3786
3961
|
|
|
3787
3962
|
// ../common/src/registry.ts
|
|
@@ -3989,8 +4164,8 @@ function detectExecutionContext(options = {}) {
|
|
|
3989
4164
|
function getExecutionContextTelemetryProperties() {
|
|
3990
4165
|
const detected = detectExecutionContext();
|
|
3991
4166
|
return {
|
|
3992
|
-
|
|
3993
|
-
...detected.ciProvider ? {
|
|
4167
|
+
[BaseDimensions.ExecutionContext]: detected.executionContext,
|
|
4168
|
+
...detected.ciProvider ? { [BaseDimensions.CiProvider]: detected.ciProvider } : {}
|
|
3994
4169
|
};
|
|
3995
4170
|
}
|
|
3996
4171
|
// ../common/src/telemetry/node-context-storage.ts
|
|
@@ -4033,7 +4208,7 @@ function getInboundTraceContext() {
|
|
|
4033
4208
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
4034
4209
|
var SESSION_ID_MAX_LENGTH = 64;
|
|
4035
4210
|
var RANDOM_SESSION_ID_LENGTH = 32;
|
|
4036
|
-
var TELEMETRY_SESSION_SOURCE_PROPERTY = "
|
|
4211
|
+
var TELEMETRY_SESSION_SOURCE_PROPERTY = "SessionIdSource";
|
|
4037
4212
|
var CONTROL_CHARACTERS = /\p{Cc}/gu;
|
|
4038
4213
|
var INHERITED_SESSION_SOURCES = [
|
|
4039
4214
|
{ envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
|
|
@@ -4085,6 +4260,9 @@ function resolveTelemetrySession() {
|
|
|
4085
4260
|
telemetrySessionSlot.set(resolved);
|
|
4086
4261
|
return resolved;
|
|
4087
4262
|
}
|
|
4263
|
+
function getTelemetrySessionId() {
|
|
4264
|
+
return resolveTelemetrySession().id;
|
|
4265
|
+
}
|
|
4088
4266
|
function getTelemetrySessionSource() {
|
|
4089
4267
|
return resolveTelemetrySession().source;
|
|
4090
4268
|
}
|
|
@@ -4165,7 +4343,10 @@ class TelemetryService {
|
|
|
4165
4343
|
} catch (error) {
|
|
4166
4344
|
const durationMs = clock.elapsedMs();
|
|
4167
4345
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
4168
|
-
await this.telemetryProvider.trackRequest(this.spanFor(name, durationMs, false, {
|
|
4346
|
+
await this.telemetryProvider.trackRequest(this.spanFor(name, durationMs, false, {
|
|
4347
|
+
...properties,
|
|
4348
|
+
[CommandDimensions.ErrorMessage]: err.message
|
|
4349
|
+
}, context));
|
|
4169
4350
|
throw error;
|
|
4170
4351
|
}
|
|
4171
4352
|
}
|
|
@@ -4236,7 +4417,10 @@ class TelemetryService {
|
|
|
4236
4417
|
const durationMs = clock.elapsedMs();
|
|
4237
4418
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
4238
4419
|
await this.telemetryProvider.trackDependency({
|
|
4239
|
-
...this.spanFor(name, durationMs, false, {
|
|
4420
|
+
...this.spanFor(name, durationMs, false, {
|
|
4421
|
+
...properties,
|
|
4422
|
+
[CommandDimensions.ErrorMessage]: err.message
|
|
4423
|
+
}, childContext),
|
|
4240
4424
|
type
|
|
4241
4425
|
});
|
|
4242
4426
|
throw error;
|
|
@@ -4271,9 +4455,10 @@ class TelemetryService {
|
|
|
4271
4455
|
...globalProperties,
|
|
4272
4456
|
...this.defaultProperties,
|
|
4273
4457
|
...redactProperties(properties ?? {}),
|
|
4274
|
-
[TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource()
|
|
4458
|
+
[TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource(),
|
|
4459
|
+
[BaseDimensions.SessionId]: this.telemetryProvider.getSessionId?.() ?? getTelemetrySessionId()
|
|
4275
4460
|
};
|
|
4276
|
-
return enriched;
|
|
4461
|
+
return lowercaseIdDimensionValues(enriched);
|
|
4277
4462
|
}
|
|
4278
4463
|
generateId() {
|
|
4279
4464
|
const bytes = new Uint8Array(8);
|
|
@@ -5040,7 +5225,165 @@ class FilterImplicitLimitError extends Error {
|
|
|
5040
5225
|
this.instructions = "Pass --limit <n> to choose how many records the filter applies to. " + "To filter over all records, pass the command's maximum accepted --limit (see the option's description in --help).";
|
|
5041
5226
|
}
|
|
5042
5227
|
}
|
|
5043
|
-
function
|
|
5228
|
+
function countRecords(data) {
|
|
5229
|
+
if (Array.isArray(data))
|
|
5230
|
+
return data.length;
|
|
5231
|
+
return data == null ? 0 : 1;
|
|
5232
|
+
}
|
|
5233
|
+
function availableFields(data) {
|
|
5234
|
+
const records = Array.isArray(data) ? data : [data];
|
|
5235
|
+
const keys = new Set;
|
|
5236
|
+
for (const record of records) {
|
|
5237
|
+
if (record && typeof record === "object" && !Array.isArray(record)) {
|
|
5238
|
+
for (const key of Object.keys(record))
|
|
5239
|
+
keys.add(key);
|
|
5240
|
+
}
|
|
5241
|
+
}
|
|
5242
|
+
return [...keys];
|
|
5243
|
+
}
|
|
5244
|
+
function decodeQuotedIdentifier(whole, inner) {
|
|
5245
|
+
const [error, decoded] = catchError(() => JSON.parse(whole));
|
|
5246
|
+
if (!error && typeof decoded === "string")
|
|
5247
|
+
return decoded;
|
|
5248
|
+
return inner.replace(/\\(.)/g, "$1");
|
|
5249
|
+
}
|
|
5250
|
+
function referencedFields(filter) {
|
|
5251
|
+
const top = new Set;
|
|
5252
|
+
const nested = new Set;
|
|
5253
|
+
const withoutValueLiterals = filter.replace(/'(?:\\.|[^'\\])*'/g, " ").replace(/`(?:\\.|[^`\\])*`/g, " ");
|
|
5254
|
+
const isPathTail = (text, index) => text[index - 1] === "." && /[A-Za-z0-9_"]/.test(text[index - 2] ?? "");
|
|
5255
|
+
const quoted = [];
|
|
5256
|
+
const withoutLiterals = withoutValueLiterals.replace(/"((?:\\.|[^"\\])*)"/g, (whole, name, index) => {
|
|
5257
|
+
const isAlias = /^\s*:/.test(withoutValueLiterals.slice(index + whole.length));
|
|
5258
|
+
if (!isAlias) {
|
|
5259
|
+
quoted.push({
|
|
5260
|
+
name: decodeQuotedIdentifier(whole, name),
|
|
5261
|
+
index,
|
|
5262
|
+
tail: isPathTail(withoutValueLiterals, index)
|
|
5263
|
+
});
|
|
5264
|
+
}
|
|
5265
|
+
return `"${" ".repeat(whole.length - 2)}"`;
|
|
5266
|
+
});
|
|
5267
|
+
const descent = /[A-Za-z0-9_"]\s*[.[]/.exec(withoutLiterals);
|
|
5268
|
+
const rootEnd = descent ? descent.index + 1 : Number.POSITIVE_INFINITY;
|
|
5269
|
+
const place = (name, index, tail) => {
|
|
5270
|
+
if (tail || index >= rootEnd)
|
|
5271
|
+
nested.add(name);
|
|
5272
|
+
else
|
|
5273
|
+
top.add(name);
|
|
5274
|
+
};
|
|
5275
|
+
for (const entry of quoted)
|
|
5276
|
+
place(entry.name, entry.index, entry.tail);
|
|
5277
|
+
const identifiers = withoutLiterals.matchAll(/([A-Za-z_][A-Za-z0-9_]*)(\s*[:(])?/g);
|
|
5278
|
+
const reserved = new Set(["true", "false", "null", "and", "or", "not"]);
|
|
5279
|
+
for (const match of identifiers) {
|
|
5280
|
+
const [, name, trailing] = match;
|
|
5281
|
+
if (trailing || reserved.has(name))
|
|
5282
|
+
continue;
|
|
5283
|
+
place(name, match.index, isPathTail(withoutLiterals, match.index));
|
|
5284
|
+
}
|
|
5285
|
+
return {
|
|
5286
|
+
top: [...top],
|
|
5287
|
+
nested: [...nested].filter((name) => !top.has(name)),
|
|
5288
|
+
hasPredicate: /\[\s*\?/.test(withoutValueLiterals)
|
|
5289
|
+
};
|
|
5290
|
+
}
|
|
5291
|
+
function appearsBelowTopLevel(data, name) {
|
|
5292
|
+
let budget = 2000;
|
|
5293
|
+
const visit = (value, depth) => {
|
|
5294
|
+
if (budget-- <= 0 || depth > 4)
|
|
5295
|
+
return false;
|
|
5296
|
+
if (value === null || typeof value !== "object")
|
|
5297
|
+
return false;
|
|
5298
|
+
if (Array.isArray(value))
|
|
5299
|
+
return value.some((entry) => visit(entry, depth));
|
|
5300
|
+
const record = value;
|
|
5301
|
+
if (depth > 0 && Object.hasOwn(record, name))
|
|
5302
|
+
return true;
|
|
5303
|
+
return Object.values(record).some((entry) => visit(entry, depth + 1));
|
|
5304
|
+
};
|
|
5305
|
+
return visit(data, 0);
|
|
5306
|
+
}
|
|
5307
|
+
function alwaysNullKeys(records) {
|
|
5308
|
+
const objects = records.filter((r) => r != null && typeof r === "object" && !Array.isArray(r));
|
|
5309
|
+
if (objects.length === 0 || objects.length !== records.length)
|
|
5310
|
+
return [];
|
|
5311
|
+
const keys = [...new Set(objects.flatMap((o) => Object.keys(o)))];
|
|
5312
|
+
if (keys.length === 0)
|
|
5313
|
+
return [];
|
|
5314
|
+
const nullKeys = keys.filter((key) => objects.every((record) => record[key] === null));
|
|
5315
|
+
return nullKeys.length === keys.length ? nullKeys : [];
|
|
5316
|
+
}
|
|
5317
|
+
function carriesOnlyNulls(value) {
|
|
5318
|
+
if (value === null)
|
|
5319
|
+
return true;
|
|
5320
|
+
if (Array.isArray(value)) {
|
|
5321
|
+
return value.length > 0 && value.every(carriesOnlyNulls);
|
|
5322
|
+
}
|
|
5323
|
+
if (typeof value === "object" && value !== undefined) {
|
|
5324
|
+
const values = Object.values(value);
|
|
5325
|
+
return values.length > 0 && values.every(carriesOnlyNulls);
|
|
5326
|
+
}
|
|
5327
|
+
return false;
|
|
5328
|
+
}
|
|
5329
|
+
function nameList(names, cap2 = 12) {
|
|
5330
|
+
const shown = names.slice(0, cap2).map((n) => `\`${n}\``);
|
|
5331
|
+
const rest = names.length - shown.length;
|
|
5332
|
+
return shown.join(", ") + (rest > 0 ? `, and ${rest} more` : "");
|
|
5333
|
+
}
|
|
5334
|
+
function buildFilterWarning(filter, data, outcome) {
|
|
5335
|
+
const present = availableFields(data);
|
|
5336
|
+
const refs = referencedFields(filter);
|
|
5337
|
+
const unknown = refs.top.filter((name) => !present.includes(name) && !appearsBelowTopLevel(data, name));
|
|
5338
|
+
const unchecked = refs.nested.filter((name) => !present.includes(name));
|
|
5339
|
+
const count = countRecords(data);
|
|
5340
|
+
const scope = `${count} record(s)`;
|
|
5341
|
+
const isNotAField = (names) => `${nameList(names)} ${names.length === 1 ? "is not a field" : "are not fields"} on the ${scope} it read`;
|
|
5342
|
+
const soundness = unchecked.length > 0 ? `${nameList(unchecked)} ${unchecked.length === 1 ? "reads" : "read"} below the top level, so ${unchecked.length === 1 ? "it was" : "they were"} not checked against the record keys` : refs.top.length > 0 ? "every field it names exists" : "";
|
|
5343
|
+
const withSoundness = (base) => soundness ? `${base}, and ${soundness}` : base;
|
|
5344
|
+
let detail;
|
|
5345
|
+
let lede;
|
|
5346
|
+
if (outcome.kind === "null-elements") {
|
|
5347
|
+
lede = "returned only null values";
|
|
5348
|
+
const projected = `all ${outcome.count} of the elements it projected are null`;
|
|
5349
|
+
if (unknown.length > 0) {
|
|
5350
|
+
detail = `${projected}, because ${isNotAField(unknown)}`;
|
|
5351
|
+
} else if (unchecked.length > 0) {
|
|
5352
|
+
detail = withSoundness(projected);
|
|
5353
|
+
} else {
|
|
5354
|
+
detail = `${projected}, and every field it names exists — a multi-select list ` + `(\`[A, B]\`) reads each entry against \`Data\` itself, so on a list ` + `result use \`[].[A, B]\` or \`[].{a: A, b: B}\` to read the records`;
|
|
5355
|
+
}
|
|
5356
|
+
} else if (outcome.kind === "null-rows") {
|
|
5357
|
+
lede = "returned only null values";
|
|
5358
|
+
const projected = `every value it projected is null on all ${outcome.count} row(s)`;
|
|
5359
|
+
detail = unknown.length > 0 ? `${projected}, because ${isNotAField(unknown)}` : withSoundness(projected);
|
|
5360
|
+
} else if (outcome.kind === "null-values") {
|
|
5361
|
+
lede = "returned only null values";
|
|
5362
|
+
const projected = `every key it projected (${nameList(outcome.keys)}) is null`;
|
|
5363
|
+
const sameSet = unknown.length === outcome.keys.length && outcome.keys.every((k) => unknown.includes(k));
|
|
5364
|
+
if (sameSet) {
|
|
5365
|
+
detail = `${isNotAField(outcome.keys)}, so every key it projected is null`;
|
|
5366
|
+
} else if (unknown.length > 0) {
|
|
5367
|
+
detail = `${projected}, because ${isNotAField(unknown)}`;
|
|
5368
|
+
} else {
|
|
5369
|
+
detail = withSoundness(`${projected} on all ${scope}`);
|
|
5370
|
+
}
|
|
5371
|
+
} else {
|
|
5372
|
+
lede = "returned nothing";
|
|
5373
|
+
if (unknown.length > 0) {
|
|
5374
|
+
detail = isNotAField(unknown);
|
|
5375
|
+
} else {
|
|
5376
|
+
const selection = refs.hasPredicate ? "no record matched" : "the expression resolved to no value";
|
|
5377
|
+
detail = withSoundness(`${selection} — it read ${scope}`);
|
|
5378
|
+
}
|
|
5379
|
+
}
|
|
5380
|
+
const fields = present.length > 0 ? ` Available fields: ${nameList(present)}.` : "";
|
|
5381
|
+
return `--output-filter ${JSON.stringify(filter)} ${lede}: ${detail}.${fields}`;
|
|
5382
|
+
}
|
|
5383
|
+
function appendWarning(existing, note) {
|
|
5384
|
+
return existing ? `${existing} ${note}` : note;
|
|
5385
|
+
}
|
|
5386
|
+
function applyFilter(data, filter, onWarning) {
|
|
5044
5387
|
const codec = requireJmespath();
|
|
5045
5388
|
let result;
|
|
5046
5389
|
try {
|
|
@@ -5048,9 +5391,34 @@ function applyFilter(data, filter) {
|
|
|
5048
5391
|
} catch (err) {
|
|
5049
5392
|
throw new FilterEvaluationError(filter, err);
|
|
5050
5393
|
}
|
|
5051
|
-
|
|
5394
|
+
const inputCount = countRecords(data);
|
|
5395
|
+
const warn = (outcome) => {
|
|
5396
|
+
if (inputCount === 0)
|
|
5397
|
+
return;
|
|
5398
|
+
const note = buildFilterWarning(filter, data, outcome);
|
|
5399
|
+
getOutputSink().writeErr(`[WARN] ${note}
|
|
5400
|
+
`);
|
|
5401
|
+
onWarning?.(note);
|
|
5402
|
+
};
|
|
5403
|
+
const warnIfAllNull = (records) => {
|
|
5404
|
+
const keys = alwaysNullKeys(records);
|
|
5405
|
+
if (keys.length > 0)
|
|
5406
|
+
warn({ kind: "null-values", keys });
|
|
5407
|
+
};
|
|
5408
|
+
if (result == null) {
|
|
5409
|
+
warn({ kind: "empty" });
|
|
5052
5410
|
return [];
|
|
5411
|
+
}
|
|
5053
5412
|
if (Array.isArray(result)) {
|
|
5413
|
+
if (result.length === 0) {
|
|
5414
|
+
warn({ kind: "empty" });
|
|
5415
|
+
} else if (result.every((entry) => entry === null)) {
|
|
5416
|
+
warn({ kind: "null-elements", count: result.length });
|
|
5417
|
+
} else if (result.every((entry) => Array.isArray(entry)) && carriesOnlyNulls(result)) {
|
|
5418
|
+
warn({ kind: "null-rows", count: result.length });
|
|
5419
|
+
} else {
|
|
5420
|
+
warnIfAllNull(result);
|
|
5421
|
+
}
|
|
5054
5422
|
if (result.length > 0 && typeof result[0] !== "object") {
|
|
5055
5423
|
const fieldMatch = filter.match(/\.(\w+)$/);
|
|
5056
5424
|
const key = fieldMatch ? fieldMatch[1] : "Value";
|
|
@@ -5058,10 +5426,30 @@ function applyFilter(data, filter) {
|
|
|
5058
5426
|
}
|
|
5059
5427
|
return result;
|
|
5060
5428
|
}
|
|
5061
|
-
if (typeof result === "object")
|
|
5429
|
+
if (typeof result === "object") {
|
|
5430
|
+
warnIfAllNull([result]);
|
|
5062
5431
|
return result;
|
|
5432
|
+
}
|
|
5063
5433
|
return { Value: result };
|
|
5064
5434
|
}
|
|
5435
|
+
function filterFailureData(envelope) {
|
|
5436
|
+
const filter = getOutputFilter();
|
|
5437
|
+
const data = envelope.Data;
|
|
5438
|
+
if (!filter || data == null)
|
|
5439
|
+
return;
|
|
5440
|
+
let note;
|
|
5441
|
+
const [filterError, filtered] = catchError(() => applyFilter(data, filter, (n) => {
|
|
5442
|
+
note = n;
|
|
5443
|
+
}));
|
|
5444
|
+
if (filterError) {
|
|
5445
|
+
envelope.Warning = appendWarning(envelope.Warning, `--output-filter was not applied, so Data is shown in full: ${filterError.message}`);
|
|
5446
|
+
return;
|
|
5447
|
+
}
|
|
5448
|
+
envelope.Data = filtered;
|
|
5449
|
+
if (note) {
|
|
5450
|
+
envelope.Warning = appendWarning(envelope.Warning, note);
|
|
5451
|
+
}
|
|
5452
|
+
}
|
|
5065
5453
|
function defaultErrorCodeForResult(result) {
|
|
5066
5454
|
switch (result) {
|
|
5067
5455
|
case RESULTS.AuthenticationError:
|
|
@@ -5105,7 +5493,7 @@ function defaultErrorCodeForHttpStatus(status) {
|
|
|
5105
5493
|
return "server_error";
|
|
5106
5494
|
return;
|
|
5107
5495
|
}
|
|
5108
|
-
var LOCAL_PERMISSION_TEXT_PATTERN =
|
|
5496
|
+
var LOCAL_PERMISSION_TEXT_PATTERN = new RegExp(`(?:\\b|\\()(?:${[...LOCAL_PERMISSION_ERROR_CODES].join("|")})(?::\\s|\\))`);
|
|
5109
5497
|
function defaultErrorCodeForFailure(data) {
|
|
5110
5498
|
if (data.Result === RESULTS.Failure) {
|
|
5111
5499
|
const status = data.Context?.httpStatus ?? parseHttpStatusFromMessage2(data.Message);
|
|
@@ -5144,8 +5532,14 @@ var OutputFormatter;
|
|
|
5144
5532
|
}
|
|
5145
5533
|
const filter = getOutputFilter();
|
|
5146
5534
|
if (filter) {
|
|
5147
|
-
|
|
5535
|
+
let note;
|
|
5536
|
+
const filtered = applyFilter(data.Data, filter, (n) => {
|
|
5537
|
+
note = n;
|
|
5538
|
+
});
|
|
5148
5539
|
data.Data = normalize ? normalizeDataKeys(filtered, verbatim, subtrees && { refs: subtrees.refs, mode: "skip" }) : filtered;
|
|
5540
|
+
if (note) {
|
|
5541
|
+
data.Warning = appendWarning(data.Warning, note);
|
|
5542
|
+
}
|
|
5149
5543
|
}
|
|
5150
5544
|
logOutput(normalizeOutputKeys(data), getOutputFormat(), options?.tableRowStyle);
|
|
5151
5545
|
}
|
|
@@ -5173,12 +5567,13 @@ var OutputFormatter;
|
|
|
5173
5567
|
delete envelope.TelemetryErrorClass;
|
|
5174
5568
|
delete envelope.TelemetryTerminalOutcome;
|
|
5175
5569
|
delete envelope.TelemetryTerminalSignal;
|
|
5570
|
+
filterFailureData(envelope);
|
|
5176
5571
|
if (!suppressTelemetry) {
|
|
5177
5572
|
telemetry.trackEvent(CommonTelemetryEvents.Error, {
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5573
|
+
[ErrorDimensions.Result]: data.Result,
|
|
5574
|
+
[ErrorDimensions.ErrorCode]: data.ErrorCode,
|
|
5575
|
+
[ErrorDimensions.Retry]: data.Retry,
|
|
5576
|
+
[ErrorDimensions.ErrorMessage]: data.Message
|
|
5182
5577
|
});
|
|
5183
5578
|
}
|
|
5184
5579
|
logOutput(normalizeOutputKeys(envelope), getOutputFormat());
|
|
@@ -5221,13 +5616,20 @@ var OutputFormatter;
|
|
|
5221
5616
|
OutputFormatter.log = log;
|
|
5222
5617
|
function formatToString(data) {
|
|
5223
5618
|
const filter = getOutputFilter();
|
|
5619
|
+
const envelope = data;
|
|
5224
5620
|
if ("Data" in data && data.Data != null) {
|
|
5225
5621
|
data.Data = normalizeDataKeys(data.Data);
|
|
5226
5622
|
if (filter) {
|
|
5227
|
-
|
|
5623
|
+
let note;
|
|
5624
|
+
data.Data = normalizeDataKeys(applyFilter(data.Data, filter, (n) => {
|
|
5625
|
+
note = n;
|
|
5626
|
+
}));
|
|
5627
|
+
if (note) {
|
|
5628
|
+
envelope.Warning = appendWarning(envelope.Warning, note);
|
|
5629
|
+
}
|
|
5228
5630
|
}
|
|
5229
5631
|
}
|
|
5230
|
-
const output = normalizeOutputKeys(
|
|
5632
|
+
const output = normalizeOutputKeys(envelope);
|
|
5231
5633
|
const lines = [];
|
|
5232
5634
|
const sink = getOutputSink();
|
|
5233
5635
|
printOutput(output, getOutputFormat(), (msg) => {
|
|
@@ -5277,7 +5679,7 @@ var LEGACY_SKILL_NAMESPACE = "uipath:";
|
|
|
5277
5679
|
var MAX_SKILL_NAME_LENGTH = 80;
|
|
5278
5680
|
var SKILL_NAME_PATTERN = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
5279
5681
|
function productMode(productArea, mode) {
|
|
5280
|
-
return {
|
|
5682
|
+
return { ProductArea: productArea, Mode: mode };
|
|
5281
5683
|
}
|
|
5282
5684
|
function attributionRecord(groups) {
|
|
5283
5685
|
const record = {};
|
|
@@ -5335,6 +5737,7 @@ var COMMAND_ATTRIBUTION = commandAttribution([
|
|
|
5335
5737
|
["rpa", "build", ["uip.rpa-legacy"]],
|
|
5336
5738
|
["conversational", "operate", ["uip.conversational"]],
|
|
5337
5739
|
["agents", "build", ["uip.codedagent", "uip.agent"]],
|
|
5740
|
+
["coding-agents", "build", ["uip.coder"]],
|
|
5338
5741
|
["agenthub", "build", ["uip.agenthub"]],
|
|
5339
5742
|
["coded-apps", "build", ["uip.codedapp"]],
|
|
5340
5743
|
["functions", "build", ["uip.function", "uip.functions"]],
|
|
@@ -5420,32 +5823,64 @@ function normalizeSkillName(value) {
|
|
|
5420
5823
|
function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
5421
5824
|
const skillName = normalizeSkillName(skillSource);
|
|
5422
5825
|
return {
|
|
5423
|
-
...skillName ? {
|
|
5826
|
+
...skillName ? { SkillName: skillName } : {},
|
|
5424
5827
|
...getCommandProductModeAttribution(commandPath)
|
|
5425
5828
|
};
|
|
5426
5829
|
}
|
|
5830
|
+
var AGENT_SESSION_ENV = {
|
|
5831
|
+
[BaseDimensions.AgentModel]: "UIPATH_AGENT_MODEL",
|
|
5832
|
+
[SkillsDimensions.PermissionMode]: "UIPATH_PERMISSION_MODE",
|
|
5833
|
+
[SkillsDimensions.EffortLevel]: "UIPATH_EFFORT_LEVEL",
|
|
5834
|
+
[SkillsDimensions.SkillsVersion]: "UIPATH_SKILLS_VERSION"
|
|
5835
|
+
};
|
|
5836
|
+
var MAX_TELEMETRY_TOKEN_LENGTH = 120;
|
|
5837
|
+
function sanitizeTelemetryToken(value) {
|
|
5838
|
+
return value.replace(/[^A-Za-z0-9:._/ -]/g, "_").slice(0, MAX_TELEMETRY_TOKEN_LENGTH);
|
|
5839
|
+
}
|
|
5840
|
+
function buildAgentSessionTelemetry(env) {
|
|
5841
|
+
const dimensions = {};
|
|
5842
|
+
for (const [key, variable] of Object.entries(AGENT_SESSION_ENV)) {
|
|
5843
|
+
const value = env[variable]?.trim();
|
|
5844
|
+
if (value) {
|
|
5845
|
+
dimensions[key] = sanitizeTelemetryToken(value);
|
|
5846
|
+
}
|
|
5847
|
+
}
|
|
5848
|
+
return dimensions;
|
|
5849
|
+
}
|
|
5427
5850
|
|
|
5428
5851
|
// ../common/src/telemetry/command-name.ts
|
|
5429
|
-
var
|
|
5852
|
+
var TELEMETRY_NAME_ROOT = "Cli";
|
|
5853
|
+
var CLI_COMMAND_ROOT = "uip";
|
|
5854
|
+
var TELEMETRY_NAME_BARE_ACTION = "Invoke";
|
|
5430
5855
|
function commandTelemetryName(parts) {
|
|
5856
|
+
const action = vetCommandTokens(parts).map(pascalizeToken).join("");
|
|
5857
|
+
return `${TELEMETRY_NAME_ROOT}.${action || TELEMETRY_NAME_BARE_ACTION}`;
|
|
5858
|
+
}
|
|
5859
|
+
function commandInvocationPath(parts) {
|
|
5860
|
+
return [CLI_COMMAND_ROOT, ...vetCommandTokens(parts)].join(" ");
|
|
5861
|
+
}
|
|
5862
|
+
function vetCommandTokens(parts) {
|
|
5431
5863
|
const tokens = [];
|
|
5432
5864
|
for (const part of parts) {
|
|
5433
|
-
const pieces = String(part ?? "").split(/\s+/).filter((token) => token && !token.startsWith("-") && token !==
|
|
5865
|
+
const pieces = String(part ?? "").split(/\s+/).filter((token) => token && !token.startsWith("-") && token !== CLI_COMMAND_ROOT);
|
|
5434
5866
|
if (pieces.every(isCommandToken)) {
|
|
5435
5867
|
tokens.push(...pieces);
|
|
5436
5868
|
continue;
|
|
5437
5869
|
}
|
|
5438
5870
|
tokens.push(UNKNOWN_TOKEN);
|
|
5439
5871
|
}
|
|
5440
|
-
return
|
|
5872
|
+
return tokens;
|
|
5873
|
+
}
|
|
5874
|
+
function pascalizeToken(token) {
|
|
5875
|
+
return token.split("-").filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
5441
5876
|
}
|
|
5442
|
-
var COMMAND_TOKEN_PATTERN = /^[a-
|
|
5877
|
+
var COMMAND_TOKEN_PATTERN = /^[a-z][a-z0-9-]*$/;
|
|
5443
5878
|
var MAX_COMMAND_TOKEN_LENGTH = 32;
|
|
5444
5879
|
var GUID_TOKEN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
5445
5880
|
function isCommandToken(token) {
|
|
5446
|
-
return token.length <= MAX_COMMAND_TOKEN_LENGTH && COMMAND_TOKEN_PATTERN.test(token) && !GUID_TOKEN.test(token)
|
|
5881
|
+
return token.length <= MAX_COMMAND_TOKEN_LENGTH && COMMAND_TOKEN_PATTERN.test(token) && !GUID_TOKEN.test(token);
|
|
5447
5882
|
}
|
|
5448
|
-
var UNKNOWN_TOKEN = "
|
|
5883
|
+
var UNKNOWN_TOKEN = "unknown";
|
|
5449
5884
|
|
|
5450
5885
|
// ../common/src/telemetry/invocation-request.ts
|
|
5451
5886
|
var requestContextSlot = singleton("TelemetryInvocationRequestContext");
|
|
@@ -5550,7 +5985,7 @@ function withheldArgumentValues(cmd) {
|
|
|
5550
5985
|
});
|
|
5551
5986
|
return values;
|
|
5552
5987
|
}
|
|
5553
|
-
function
|
|
5988
|
+
function deriveCommandParts(cmd) {
|
|
5554
5989
|
const parts = [];
|
|
5555
5990
|
let current = cmd;
|
|
5556
5991
|
while (current) {
|
|
@@ -5563,14 +5998,13 @@ function deriveCommandPath(cmd) {
|
|
|
5563
5998
|
if (parts.length > 1) {
|
|
5564
5999
|
parts.shift();
|
|
5565
6000
|
}
|
|
5566
|
-
return
|
|
6001
|
+
return parts;
|
|
5567
6002
|
}
|
|
5568
6003
|
function isErrorContext(value) {
|
|
5569
6004
|
return value !== null && typeof value === "object";
|
|
5570
6005
|
}
|
|
5571
6006
|
function commandHelpHint(commandPath) {
|
|
5572
|
-
|
|
5573
|
-
return `An unexpected error occurred. Run '${command} --help' to verify command syntax, or run with --log-level debug for details.`;
|
|
6007
|
+
return `An unexpected error occurred. Run '${commandPath} --help' to verify command syntax, or run with --log-level debug for details.`;
|
|
5574
6008
|
}
|
|
5575
6009
|
function isPromptCancellation(error) {
|
|
5576
6010
|
return error instanceof Error && error.name === "ExitPromptError";
|
|
@@ -5595,7 +6029,9 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
5595
6029
|
yaml: getOutputFormat() === "yaml",
|
|
5596
6030
|
filter: getOutputFilter() !== undefined
|
|
5597
6031
|
});
|
|
5598
|
-
const
|
|
6032
|
+
const commandParts = deriveCommandParts(command);
|
|
6033
|
+
const telemetryName = commandTelemetryName(commandParts);
|
|
6034
|
+
const commandPath = commandInvocationPath(commandParts);
|
|
5599
6035
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
5600
6036
|
markCommandStart();
|
|
5601
6037
|
const supplied = recordSuppliedArgumentValues(withheldArgumentValues(command));
|
|
@@ -5630,7 +6066,7 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
5630
6066
|
Result: finalResult,
|
|
5631
6067
|
...customErrorCode ? { ErrorCode: customErrorCode } : {},
|
|
5632
6068
|
Message: errorMessage,
|
|
5633
|
-
Instructions: customInstructions ?? commandHelpHint(
|
|
6069
|
+
Instructions: customInstructions ?? commandHelpHint(commandPath),
|
|
5634
6070
|
...customRetry ? { Retry: customRetry } : {},
|
|
5635
6071
|
...customContext ? { Context: customContext } : {}
|
|
5636
6072
|
});
|
|
@@ -5647,8 +6083,8 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
5647
6083
|
recordedFailure,
|
|
5648
6084
|
pollSignal: context.pollSignal
|
|
5649
6085
|
});
|
|
5650
|
-
if (terminalTelemetry.
|
|
5651
|
-
telemetry.trackException(error instanceof Error ? error : new Error(String(error)), {
|
|
6086
|
+
if (terminalTelemetry[CommandDimensions.ErrorClass] === "internal" && error) {
|
|
6087
|
+
telemetry.trackException(error instanceof Error ? error : new Error(String(error)), { [CommandDimensions.CommandName]: commandPath }, getInvocationRequestContext());
|
|
5652
6088
|
}
|
|
5653
6089
|
const commandParams = extractCommandParams(command);
|
|
5654
6090
|
if (props) {
|
|
@@ -5659,10 +6095,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
5659
6095
|
const baseProperties = redactProperties({
|
|
5660
6096
|
...commandParams,
|
|
5661
6097
|
...props,
|
|
5662
|
-
...buildCommandTelemetryAttribution(
|
|
5663
|
-
|
|
6098
|
+
...buildCommandTelemetryAttribution(commandPath, process.env.UIPATH_SKILL),
|
|
6099
|
+
...buildAgentSessionTelemetry(process.env),
|
|
6100
|
+
[CommandDimensions.CommandName]: commandPath,
|
|
6101
|
+
[CommandDimensions.IsCommand]: "true",
|
|
5664
6102
|
...terminalTelemetry,
|
|
5665
|
-
...errorMessage ? { errorMessage } : {}
|
|
6103
|
+
...errorMessage ? { [CommandDimensions.ErrorMessage]: errorMessage } : {}
|
|
5666
6104
|
});
|
|
5667
6105
|
emitInvocationRequest(telemetryName, success, baseProperties);
|
|
5668
6106
|
} finally {
|
|
@@ -5907,6 +6345,40 @@ var BOOLEAN_FLAGS = new Set(HOST_GLOBAL_FLAGS);
|
|
|
5907
6345
|
// ../common/src/interactivity-context.ts
|
|
5908
6346
|
var modeSlot = singleton("InteractivityMode");
|
|
5909
6347
|
var interactiveFlagSlot = singleton("InteractiveFlag");
|
|
6348
|
+
// ../common/src/mime-types.ts
|
|
6349
|
+
var MIME_TYPES_BY_EXTENSION = Object.freeze({
|
|
6350
|
+
pdf: "application/pdf",
|
|
6351
|
+
png: "image/png",
|
|
6352
|
+
jpg: "image/jpeg",
|
|
6353
|
+
jpeg: "image/jpeg",
|
|
6354
|
+
gif: "image/gif",
|
|
6355
|
+
webp: "image/webp",
|
|
6356
|
+
bmp: "image/bmp",
|
|
6357
|
+
tif: "image/tiff",
|
|
6358
|
+
tiff: "image/tiff",
|
|
6359
|
+
svg: "image/svg+xml",
|
|
6360
|
+
txt: "text/plain",
|
|
6361
|
+
log: "text/plain",
|
|
6362
|
+
md: "text/markdown",
|
|
6363
|
+
csv: "text/csv",
|
|
6364
|
+
tsv: "text/tab-separated-values",
|
|
6365
|
+
json: "application/json",
|
|
6366
|
+
xml: "application/xml",
|
|
6367
|
+
html: "text/html",
|
|
6368
|
+
htm: "text/html",
|
|
6369
|
+
yaml: "application/yaml",
|
|
6370
|
+
yml: "application/yaml",
|
|
6371
|
+
doc: "application/msword",
|
|
6372
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
6373
|
+
xls: "application/vnd.ms-excel",
|
|
6374
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
6375
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
6376
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
6377
|
+
zip: "application/zip",
|
|
6378
|
+
mp3: "audio/mpeg",
|
|
6379
|
+
wav: "audio/wav",
|
|
6380
|
+
mp4: "video/mp4"
|
|
6381
|
+
});
|
|
5910
6382
|
// ../common/src/option-aliases.ts
|
|
5911
6383
|
function warnDeprecatedOptionAlias(deprecatedFlag, preferredFlag) {
|
|
5912
6384
|
getOutputSink().writeErr(`[WARN] ${deprecatedFlag} is deprecated. Use ${preferredFlag} instead.
|
|
@@ -5990,7 +6462,7 @@ var ScreenLogger;
|
|
|
5990
6462
|
})(ScreenLogger ||= {});
|
|
5991
6463
|
// ../common/src/sdk-user-agent.ts
|
|
5992
6464
|
var CODING_AGENT_HEADER = "x-coding-agent-info";
|
|
5993
|
-
var AGENT_PROPERTY =
|
|
6465
|
+
var AGENT_PROPERTY = BaseDimensions.Agent;
|
|
5994
6466
|
var CODING_AGENT_PROPERTY = "CodingAgent";
|
|
5995
6467
|
var sdkUserAgentHostToken = singleton("SdkUserAgentHostToken");
|
|
5996
6468
|
function splitUserAgentTokens(value) {
|
|
@@ -6048,21 +6520,21 @@ function getShippedKeys() {
|
|
|
6048
6520
|
}
|
|
6049
6521
|
function dedupeKey(payload) {
|
|
6050
6522
|
return [
|
|
6051
|
-
payload.
|
|
6052
|
-
payload.
|
|
6053
|
-
payload.
|
|
6054
|
-
payload.
|
|
6055
|
-
payload.
|
|
6523
|
+
payload.CommandName,
|
|
6524
|
+
payload.ShipKind,
|
|
6525
|
+
payload.Target,
|
|
6526
|
+
payload.ProjectType,
|
|
6527
|
+
payload.ArtifactCorrelationKey ?? payload.PackageVersionKey ?? payload.DeploymentKey ?? payload.SolutionId ?? payload.PackageName ?? ""
|
|
6056
6528
|
].join("|");
|
|
6057
6529
|
}
|
|
6058
6530
|
function withPseudonymizedIdentifiers(payload) {
|
|
6059
6531
|
return {
|
|
6060
6532
|
...payload,
|
|
6061
|
-
...payload.
|
|
6062
|
-
|
|
6533
|
+
...payload.PackageName === undefined ? {} : {
|
|
6534
|
+
PackageName: `package#${pseudonymize(payload.PackageName)}`
|
|
6063
6535
|
},
|
|
6064
|
-
...payload.
|
|
6065
|
-
|
|
6536
|
+
...payload.ArtifactCorrelationKey === undefined ? {} : {
|
|
6537
|
+
ArtifactCorrelationKey: `artifact#${pseudonymize(payload.ArtifactCorrelationKey)}`
|
|
6066
6538
|
}
|
|
6067
6539
|
};
|
|
6068
6540
|
}
|
|
@@ -6389,6 +6861,11 @@ var pickName = (claims) => {
|
|
|
6389
6861
|
const username = asString(claims?.preferred_username);
|
|
6390
6862
|
return asString(claims?.name) ?? (looksLikeEmail(username) ? undefined : username);
|
|
6391
6863
|
};
|
|
6864
|
+
var pickScopes = (claims) => {
|
|
6865
|
+
const raw = claims?.scope;
|
|
6866
|
+
const scopes = Array.isArray(raw) ? raw.filter((entry) => asString(entry) !== undefined) : typeof raw === "string" ? raw.split(/\s+/).filter(Boolean) : [];
|
|
6867
|
+
return scopes.length > 0 ? scopes : undefined;
|
|
6868
|
+
};
|
|
6392
6869
|
var resolveSessionIdentity = (accessToken, authFlow) => {
|
|
6393
6870
|
const claims = accessToken ? decodeClaims(accessToken) : undefined;
|
|
6394
6871
|
const email = pickEmail(claims);
|
|
@@ -6414,6 +6891,7 @@ var resolveSessionIdentity = (accessToken, authFlow) => {
|
|
|
6414
6891
|
identity.clientId = clientId;
|
|
6415
6892
|
return identity;
|
|
6416
6893
|
};
|
|
6894
|
+
var readTokenScopes = (accessToken) => accessToken ? pickScopes(decodeClaims(accessToken)) : undefined;
|
|
6417
6895
|
|
|
6418
6896
|
// ../auth/src/envAuth.ts
|
|
6419
6897
|
var ENV_AUTH_ENABLE_VAR = "UIPATH_CLI_ENABLE_ENV_AUTH";
|
|
@@ -6486,6 +6964,7 @@ var readAuthFromEnv = () => {
|
|
|
6486
6964
|
const expiration = getTokenExpiration(accessToken);
|
|
6487
6965
|
const loginStatus = expiration && expiration <= new Date ? "Expired" : "Logged in";
|
|
6488
6966
|
const identity = resolveSessionIdentity(accessToken);
|
|
6967
|
+
const scopes = readTokenScopes(accessToken);
|
|
6489
6968
|
return {
|
|
6490
6969
|
loginStatus,
|
|
6491
6970
|
accessToken,
|
|
@@ -6496,7 +6975,8 @@ var readAuthFromEnv = () => {
|
|
|
6496
6975
|
tenantId,
|
|
6497
6976
|
expiration,
|
|
6498
6977
|
source: "env-vars" /* EnvironmentVariables */,
|
|
6499
|
-
...identity ? { identity } : {}
|
|
6978
|
+
...identity ? { identity } : {},
|
|
6979
|
+
...scopes ? { scopes } : {}
|
|
6500
6980
|
};
|
|
6501
6981
|
};
|
|
6502
6982
|
|
|
@@ -7134,10 +7614,15 @@ async function buildFileStatus(tokens, credentials, globalHint) {
|
|
|
7134
7614
|
}
|
|
7135
7615
|
function identityFields(accessToken, credentials) {
|
|
7136
7616
|
const identity = resolveSessionIdentity(accessToken, parseAuthFlow(credentials[AUTH_FLOW_ENV_VAR]));
|
|
7137
|
-
|
|
7617
|
+
const scopes = readTokenScopes(accessToken);
|
|
7618
|
+
return {
|
|
7619
|
+
...identity ? { identity } : {},
|
|
7620
|
+
...scopes ? { scopes } : {}
|
|
7621
|
+
};
|
|
7138
7622
|
}
|
|
7139
7623
|
function buildRobotStatus(robotCreds) {
|
|
7140
7624
|
const identity = resolveSessionIdentity(robotCreds.accessToken);
|
|
7625
|
+
const scopes = readTokenScopes(robotCreds.accessToken);
|
|
7141
7626
|
return {
|
|
7142
7627
|
loginStatus: "Logged in",
|
|
7143
7628
|
accessToken: robotCreds.accessToken,
|
|
@@ -7149,7 +7634,8 @@ function buildRobotStatus(robotCreds) {
|
|
|
7149
7634
|
issuer: robotCreds.issuer,
|
|
7150
7635
|
expiration: getTokenExpiration(robotCreds.accessToken),
|
|
7151
7636
|
source: "robot" /* Robot */,
|
|
7152
|
-
...identity ? { identity } : {}
|
|
7637
|
+
...identity ? { identity } : {},
|
|
7638
|
+
...scopes ? { scopes } : {}
|
|
7153
7639
|
};
|
|
7154
7640
|
}
|
|
7155
7641
|
var isFileNotFoundError = (error) => {
|
|
@@ -7402,7 +7888,7 @@ var package_default2 = {
|
|
|
7402
7888
|
name: "@uipath/ixp-sdk",
|
|
7403
7889
|
author: "UiPath",
|
|
7404
7890
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
7405
|
-
version: "1.
|
|
7891
|
+
version: "1.204.0-preview.206",
|
|
7406
7892
|
description: "SDK for the UiPath IXP (Intelligent eXtraction Platform) API — projects, taxonomies, prompts, predictions, and model publishing.",
|
|
7407
7893
|
repository: {
|
|
7408
7894
|
type: "git",
|
|
@@ -7427,6 +7913,7 @@ var package_default2 = {
|
|
|
7427
7913
|
],
|
|
7428
7914
|
scripts: {
|
|
7429
7915
|
build: "bun build ./src/index.ts --outdir dist --format esm --target node --sourcemap=linked",
|
|
7916
|
+
typecheck: "tsc --noEmit",
|
|
7430
7917
|
lint: "biome check .",
|
|
7431
7918
|
"lint:fix": "biome check --write .",
|
|
7432
7919
|
test: "vitest run"
|
|
@@ -7779,6 +8266,7 @@ async function changeFieldType(config, projectName, groupName, fieldName, typeNa
|
|
|
7779
8266
|
async function updateFieldPrompts(config, projectName, updates) {
|
|
7780
8267
|
return designtimePost(config, `/api/projects/${encodeURIComponent(projectName)}/fields/update-prompts`, {
|
|
7781
8268
|
Updates: updates.map((u) => ({
|
|
8269
|
+
Group: u.group,
|
|
7782
8270
|
Name: u.name,
|
|
7783
8271
|
Instructions: u.instructions
|
|
7784
8272
|
}))
|
|
@@ -7831,6 +8319,13 @@ async function emitError(error, message, hint) {
|
|
|
7831
8319
|
});
|
|
7832
8320
|
}
|
|
7833
8321
|
|
|
8322
|
+
// src/utils/server-limits.ts
|
|
8323
|
+
var MAX_INSTRUCTIONS_LENGTH = 4096;
|
|
8324
|
+
var MAX_NAME_LENGTH = 64;
|
|
8325
|
+
var MAX_PROJECT_NAME_LENGTH = 116;
|
|
8326
|
+
var MAX_TITLE_LENGTH = 1024;
|
|
8327
|
+
var MAX_FOLDER_KEY_LENGTH = 256;
|
|
8328
|
+
|
|
7834
8329
|
// src/commands/data-types.ts
|
|
7835
8330
|
function parseChoicesJson(raw) {
|
|
7836
8331
|
let parsed;
|
|
@@ -7945,7 +8440,7 @@ var DATA_TYPES_DELETE_EXAMPLES = [
|
|
|
7945
8440
|
];
|
|
7946
8441
|
var registerDataTypesCommand = (program2) => {
|
|
7947
8442
|
const dataTypes = program2.command("data-types").description("Manage data types (entity_defs) — the reusable type definitions fields reference via field_type_id");
|
|
7948
|
-
dataTypes.command("add").description("Create a new data type in the project").argument("<project-name>", "Project name").requiredOption("--name <name>",
|
|
8443
|
+
dataTypes.command("add").description("Create a new data type in the project").argument("<project-name>", "Project name").requiredOption("--name <name>", `Data type name (at most ${MAX_NAME_LENGTH} characters)`).requiredOption("--kind <kind>", "Underlying data type kind: text, date, money, number, boolean, choice").requiredOption("--instructions <text>", `Instructions describing what this type represents and where its values appear (at most ${MAX_INSTRUCTIONS_LENGTH} characters)`).option("--input-value <mode>", "Whether the value appears verbatim in the document (exact-match) or is inferred/computed (inferred). Required when --kind is text or choice; forbidden for date, money, number, and boolean (those kinds don't have this property — matches the IXP UI's radio visibility).").option("--choices <json>", 'Required when --kind choice. JSON array of choices: [{"value":"<canonical>","alternates":["<alt1>","<alt2>",...]}]. `value` (required) is the canonical display name (model output). `alternates` (optional, defaults to []) are alternate spellings the model maps to `value` — omit or set to [] when the canonical value is the only matched form.').addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(DATA_TYPES_ADD_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
7949
8444
|
const [err, response] = await catchError((async () => {
|
|
7950
8445
|
const choices = options.choices ? parseChoicesJson(options.choices) : undefined;
|
|
7951
8446
|
const config = await createIxpConfig({
|
|
@@ -7973,7 +8468,7 @@ var registerDataTypesCommand = (program2) => {
|
|
|
7973
8468
|
Data: response
|
|
7974
8469
|
}, { preserveDataKeys: true });
|
|
7975
8470
|
});
|
|
7976
|
-
dataTypes.command("update-instructions").description("Replace the instructions on an existing data type").argument("<project-name>", "Project name").requiredOption("--name <name>", "Data type name").requiredOption("--instructions <text>",
|
|
8471
|
+
dataTypes.command("update-instructions").description("Replace the instructions on an existing data type").argument("<project-name>", "Project name").requiredOption("--name <name>", "Data type name").requiredOption("--instructions <text>", `New instructions text, at most ${MAX_INSTRUCTIONS_LENGTH} characters (replaces the existing instructions)`).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(DATA_TYPES_UPDATE_INSTRUCTIONS_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
7977
8472
|
const [err, response] = await catchError((async () => {
|
|
7978
8473
|
const config = await createIxpConfig({
|
|
7979
8474
|
tenant: options.tenant
|
|
@@ -7994,7 +8489,7 @@ var registerDataTypesCommand = (program2) => {
|
|
|
7994
8489
|
Data: response
|
|
7995
8490
|
}, { preserveDataKeys: true });
|
|
7996
8491
|
});
|
|
7997
|
-
dataTypes.command("rename").description("Rename a data type. Existing field references stay intact.").argument("<project-name>", "Project name").requiredOption("--name <name>", "Current data type name").requiredOption("--new-name <name>",
|
|
8492
|
+
dataTypes.command("rename").description("Rename a data type. Existing field references stay intact.").argument("<project-name>", "Project name").requiredOption("--name <name>", "Current data type name").requiredOption("--new-name <name>", `New data type name (at most ${MAX_NAME_LENGTH} characters)`).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(DATA_TYPES_RENAME_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
7998
8493
|
const [err, response] = await catchError((async () => {
|
|
7999
8494
|
const config = await createIxpConfig({
|
|
8000
8495
|
tenant: options.tenant
|
|
@@ -8120,7 +8615,7 @@ var DEPLOYMENTS_LIST_EXAMPLES = [
|
|
|
8120
8615
|
];
|
|
8121
8616
|
var registerDeploymentsCommand = (program2) => {
|
|
8122
8617
|
const deployments = program2.command("deployments").description("Manage IXP deployments — deploy trained model versions to Orchestrator folders, move a deployment to another version, and inspect the taxonomy pinned to a version");
|
|
8123
|
-
deployments.command("create").description("Deploy a trained model version to an Orchestrator folder, making it callable at runtime by activities and Maestro Flow. Only ever adds a deployment — moving an existing one is `deployments upgrade`.").argument("<project-name>", "Project name").requiredOption("--version <number>", "Trained model version to deploy (non-negative integer). Get available versions from `uip ixp projects list-models <project-name> --output json`.", (raw) => parseBoundedInt(raw, "--version", { min: 0, max: 1e6 })).requiredOption("--folder-key <guid>",
|
|
8618
|
+
deployments.command("create").description("Deploy a trained model version to an Orchestrator folder, making it callable at runtime by activities and Maestro Flow. Only ever adds a deployment — moving an existing one is `deployments upgrade`.").argument("<project-name>", "Project name").requiredOption("--version <number>", "Trained model version to deploy (non-negative integer). Get available versions from `uip ixp projects list-models <project-name> --output json`.", (raw) => parseBoundedInt(raw, "--version", { min: 0, max: 1e6 })).requiredOption("--folder-key <guid>", `Orchestrator folder key (GUID) to deploy into, at most ${MAX_FOLDER_KEY_LENGTH} characters. Get it from \`uip or folders list --output json\`.`).option("--title <title>", `Title to deploy under, at most ${MAX_TITLE_LENGTH} characters (defaults to the project name minus its '-ixp' suffix). Comes back verbatim as DeploymentTitle; the backend slugs and suffixes it into the name the runtime resolves, returned as DeploymentName.`).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(DEPLOYMENTS_CREATE_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
8124
8619
|
const [err, deployment] = await catchError((async () => {
|
|
8125
8620
|
const config = await createIxpConfig({
|
|
8126
8621
|
tenant: options.tenant
|
|
@@ -8142,7 +8637,7 @@ var registerDeploymentsCommand = (program2) => {
|
|
|
8142
8637
|
Data: deployment
|
|
8143
8638
|
});
|
|
8144
8639
|
});
|
|
8145
|
-
deployments.command("upgrade").description("Move an existing deployment to another trained model version, changing which version every runtime caller of that folder and name gets").argument("<project-name>", "Project name").argument("<deployment-name>", "Deployment to move, addressed by the name the runtime resolves — the DeploymentName field of `uip ixp deployments list <project-name> --output json`, not the title it was created under.").requiredOption("--version <number>", "Trained model version to move the deployment to (non-negative integer). Get available versions from `uip ixp projects list-models <project-name> --output json`.", (raw) => parseBoundedInt(raw, "--version", { min: 0, max: 1e6 })).requiredOption("--folder-key <guid>",
|
|
8640
|
+
deployments.command("upgrade").description("Move an existing deployment to another trained model version, changing which version every runtime caller of that folder and name gets").argument("<project-name>", "Project name").argument("<deployment-name>", "Deployment to move, addressed by the name the runtime resolves — the DeploymentName field of `uip ixp deployments list <project-name> --output json`, not the title it was created under.").requiredOption("--version <number>", "Trained model version to move the deployment to (non-negative integer). Get available versions from `uip ixp projects list-models <project-name> --output json`.", (raw) => parseBoundedInt(raw, "--version", { min: 0, max: 1e6 })).requiredOption("--folder-key <guid>", `Orchestrator folder key (GUID) hosting the deployment, at most ${MAX_FOLDER_KEY_LENGTH} characters. The same name can be deployed in several folders, so the folder is part of the identity.`).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(DEPLOYMENTS_UPGRADE_EXAMPLES).trackedAction(processContext, async (projectName, deploymentName, options) => {
|
|
8146
8641
|
const [err, deployment] = await catchError((async () => {
|
|
8147
8642
|
const config = await createIxpConfig({
|
|
8148
8643
|
tenant: options.tenant
|
|
@@ -8504,8 +8999,8 @@ var FIELDS_CHANGE_TYPE_EXAMPLES = [
|
|
|
8504
8999
|
];
|
|
8505
9000
|
var FIELDS_UPDATE_PROMPTS_EXAMPLES = [
|
|
8506
9001
|
{
|
|
8507
|
-
Description: "Update per-field instructions in bulk — matched by field name
|
|
8508
|
-
Command: `uip ixp fields update-prompts my-invoices --updates '[{"name":"Invoice Number","instructions":"7-digit numeric ID at top-right"},{"name":"Total","instructions":"Grand total at the bottom"}]'`,
|
|
9002
|
+
Description: "Update per-field instructions in bulk — matched by field name within each update's field group",
|
|
9003
|
+
Command: `uip ixp fields update-prompts my-invoices --updates '[{"group":"Invoice","name":"Invoice Number","instructions":"7-digit numeric ID at top-right"},{"group":"Invoice","name":"Total","instructions":"Grand total at the bottom"}]'`,
|
|
8509
9004
|
Output: {
|
|
8510
9005
|
Code: "IxpFieldsUpdatePrompts",
|
|
8511
9006
|
Data: {
|
|
@@ -8518,7 +9013,7 @@ var FIELDS_UPDATE_PROMPTS_EXAMPLES = [
|
|
|
8518
9013
|
];
|
|
8519
9014
|
var registerFieldsCommand = (program2) => {
|
|
8520
9015
|
const fields = program2.command("fields").description("Edit fields within a project's field groups (label_defs)");
|
|
8521
|
-
fields.command("add").description("Add a new field to a field group").argument("<project-name>", "Project name").requiredOption("--group <name>", "Field group (label_def) name").requiredOption("--field <name>",
|
|
9016
|
+
fields.command("add").description("Add a new field to a field group").argument("<project-name>", "Project name").requiredOption("--group <name>", "Field group (label_def) name").requiredOption("--field <name>", `New field name (at most ${MAX_NAME_LENGTH} characters)`).requiredOption("--type <type-name>", `Field type — name of an entity_def in the project's taxonomy (at most ${MAX_NAME_LENGTH} characters)`).requiredOption("--instructions <text>", `Instructions for the new field — describes what to extract and where to find it (at most ${MAX_INSTRUCTIONS_LENGTH} characters)`).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(FIELDS_ADD_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
8522
9017
|
const [err, response] = await catchError((async () => {
|
|
8523
9018
|
const config = await createIxpConfig({
|
|
8524
9019
|
tenant: options.tenant
|
|
@@ -8560,7 +9055,7 @@ var registerFieldsCommand = (program2) => {
|
|
|
8560
9055
|
Data: response
|
|
8561
9056
|
}, { preserveDataKeys: true });
|
|
8562
9057
|
});
|
|
8563
|
-
fields.command("rename").description("Rename a field within a field group").argument("<project-name>", "Project name").requiredOption("--group <name>", "Field group (label_def) name").requiredOption("--field <name>", "Current field name").requiredOption("--new-name <name>",
|
|
9058
|
+
fields.command("rename").description("Rename a field within a field group").argument("<project-name>", "Project name").requiredOption("--group <name>", "Field group (label_def) name").requiredOption("--field <name>", "Current field name").requiredOption("--new-name <name>", `New field name (at most ${MAX_NAME_LENGTH} characters)`).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(FIELDS_RENAME_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
8564
9059
|
const [err, response] = await catchError((async () => {
|
|
8565
9060
|
const config = await createIxpConfig({
|
|
8566
9061
|
tenant: options.tenant
|
|
@@ -8578,7 +9073,7 @@ var registerFieldsCommand = (program2) => {
|
|
|
8578
9073
|
Data: response
|
|
8579
9074
|
}, { preserveDataKeys: true });
|
|
8580
9075
|
});
|
|
8581
|
-
fields.command("change-type").description("Change a field's type. IRREVERSIBLE: existing annotations for this field are deleted.").argument("<project-name>", "Project name").requiredOption("--group <name>", "Field group (label_def) name").requiredOption("--field <name>", "Field name").requiredOption("--type <type-name>",
|
|
9076
|
+
fields.command("change-type").description("Change a field's type. IRREVERSIBLE: existing annotations for this field are deleted.").argument("<project-name>", "Project name").requiredOption("--group <name>", "Field group (label_def) name").requiredOption("--field <name>", "Field name").requiredOption("--type <type-name>", `New field type — name of an entity_def in the project's taxonomy (at most ${MAX_NAME_LENGTH} characters)`).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(FIELDS_CHANGE_TYPE_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
8582
9077
|
if (!requireConfirmation(options, `change the type of field '${options.field}' (deletes its annotations)`))
|
|
8583
9078
|
return;
|
|
8584
9079
|
const [err, response] = await catchError((async () => {
|
|
@@ -8598,11 +9093,11 @@ var registerFieldsCommand = (program2) => {
|
|
|
8598
9093
|
Data: response
|
|
8599
9094
|
}, { preserveDataKeys: true });
|
|
8600
9095
|
});
|
|
8601
|
-
fields.command("update-prompts").description("Bulk-update per-field extraction instructions. Match by
|
|
9096
|
+
fields.command("update-prompts").description("Bulk-update per-field extraction instructions. Match by field name within each update's field group; existing definitions preserved.").argument("<project-name>", "Project name").requiredOption("--updates <json>", `JSON array of per-field instruction updates: [{"group":"Invoice","name":"Invoice Number","instructions":"..."}]. "group" is the field group (label_def) name, "name" is the field (moon_form) name within that group. Each \`instructions\` is at most ${MAX_INSTRUCTIONS_LENGTH} characters, each \`name\` at most ${MAX_NAME_LENGTH}.`).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(FIELDS_UPDATE_PROMPTS_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
8602
9097
|
const [err, response] = await catchError((async () => {
|
|
8603
9098
|
const rawUpdates = JSON.parse(options.updates);
|
|
8604
9099
|
if (!Array.isArray(rawUpdates)) {
|
|
8605
|
-
throw new Error('--updates must be a JSON array, e.g. [{"name":"Invoice Number","instructions":"..."}]');
|
|
9100
|
+
throw new Error('--updates must be a JSON array, e.g. [{"group":"Invoice","name":"Invoice Number","instructions":"..."}]');
|
|
8606
9101
|
}
|
|
8607
9102
|
const config = await createIxpConfig({
|
|
8608
9103
|
tenant: options.tenant
|
|
@@ -8742,7 +9237,7 @@ var GROUPS_UPDATE_PROMPTS_EXAMPLES = [
|
|
|
8742
9237
|
];
|
|
8743
9238
|
var registerGroupsCommand = (program2) => {
|
|
8744
9239
|
const groups = program2.command("groups").description("Manage field groups (label_defs) — the document type containers for fields");
|
|
8745
|
-
groups.command("add").description("Create a new field group with instructions and at least one field").argument("<project-name>", "Project name").requiredOption("--name <name>",
|
|
9240
|
+
groups.command("add").description("Create a new field group with instructions and at least one field").argument("<project-name>", "Project name").requiredOption("--name <name>", `New field group name (at most ${MAX_NAME_LENGTH} characters)`).requiredOption("--instructions <text>", `Instructions for the group — describes what kind of document/section it covers (at most ${MAX_INSTRUCTIONS_LENGTH} characters)`).requiredOption("--fields <json>", `JSON array of fields to create in the group (at least one): [{"name":"...","type":"<type-name>","instructions":"..."}]. \`type\` is the name of an entity_def in the project taxonomy. \`name\` and \`type\` are at most ${MAX_NAME_LENGTH} characters, \`instructions\` at most ${MAX_INSTRUCTIONS_LENGTH}.`).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(GROUPS_ADD_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
8746
9241
|
const [err, response] = await catchError((async () => {
|
|
8747
9242
|
const fields = parseFieldsJson(options.fields);
|
|
8748
9243
|
const config = await createIxpConfig({
|
|
@@ -8786,7 +9281,7 @@ var registerGroupsCommand = (program2) => {
|
|
|
8786
9281
|
Data: response
|
|
8787
9282
|
}, { preserveDataKeys: true });
|
|
8788
9283
|
});
|
|
8789
|
-
groups.command("rename").description("Rename a field group. Preserves all fields and annotations.").argument("<project-name>", "Project name").requiredOption("--name <name>", "Current field group name").requiredOption("--new-name <name>",
|
|
9284
|
+
groups.command("rename").description("Rename a field group. Preserves all fields and annotations.").argument("<project-name>", "Project name").requiredOption("--name <name>", "Current field group name").requiredOption("--new-name <name>", `New field group name (at most ${MAX_NAME_LENGTH} characters)`).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(GROUPS_RENAME_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
8790
9285
|
const [err, response] = await catchError((async () => {
|
|
8791
9286
|
const config = await createIxpConfig({
|
|
8792
9287
|
tenant: options.tenant
|
|
@@ -8806,7 +9301,7 @@ var registerGroupsCommand = (program2) => {
|
|
|
8806
9301
|
Data: response
|
|
8807
9302
|
}, { preserveDataKeys: true });
|
|
8808
9303
|
});
|
|
8809
|
-
groups.command("update-prompts").description("Bulk-update field group (label_def) extraction instructions. Match by group name; existing fields preserved.").argument("<project-name>", "Project name").requiredOption("--updates <json>",
|
|
9304
|
+
groups.command("update-prompts").description("Bulk-update field group (label_def) extraction instructions. Match by group name; existing fields preserved.").argument("<project-name>", "Project name").requiredOption("--updates <json>", `JSON array of field group instruction updates: [{"name":"Invoice","instructions":"..."}]. Match by label_def name. Each \`instructions\` is at most ${MAX_INSTRUCTIONS_LENGTH} characters, each \`name\` at most ${MAX_NAME_LENGTH}.`).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(GROUPS_UPDATE_PROMPTS_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
8810
9305
|
const [err, response] = await catchError((async () => {
|
|
8811
9306
|
const updates = parseUpdatesJson(options.updates);
|
|
8812
9307
|
const config = await createIxpConfig({
|
|
@@ -9842,7 +10337,7 @@ var registerProjectsCommand = (program2) => {
|
|
|
9842
10337
|
Data: response
|
|
9843
10338
|
}, { preserveDataKeys: true });
|
|
9844
10339
|
});
|
|
9845
|
-
project.command("update-title").description("Update the display title of a project").argument("<project-name>", "Project name").argument("<new-title>",
|
|
10340
|
+
project.command("update-title").description("Update the display title of a project").argument("<project-name>", "Project name").argument("<new-title>", `New display title (at most ${MAX_TITLE_LENGTH} characters, not counting leading/trailing spaces)`).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(PROJECTS_UPDATE_TITLE_EXAMPLES).trackedAction(processContext, async (projectName, newTitle, options) => {
|
|
9846
10341
|
const [err, p] = await catchError((async () => {
|
|
9847
10342
|
const config = await createIxpConfig({
|
|
9848
10343
|
tenant: options.tenant
|
|
@@ -9860,7 +10355,7 @@ var registerProjectsCommand = (program2) => {
|
|
|
9860
10355
|
Data: p
|
|
9861
10356
|
}, { preserveDataKeys: true });
|
|
9862
10357
|
});
|
|
9863
|
-
project.command("update-prompt").description("Update the project's overall extraction instructions — the taxonomy-wide prompt that gives the model context relevant across every field group. Matches the IXP UI's 'Overall extraction instructions' field on the Manage Taxonomy page. Distinct from each field group's own prompt (see `groups update-prompts`) and per-field prompts (see `fields update-prompts`).").argument("<project-name>", "Project name").requiredOption("--prompt <text>",
|
|
10358
|
+
project.command("update-prompt").description("Update the project's overall extraction instructions — the taxonomy-wide prompt that gives the model context relevant across every field group. Matches the IXP UI's 'Overall extraction instructions' field on the Manage Taxonomy page. Distinct from each field group's own prompt (see `groups update-prompts`) and per-field prompts (see `fields update-prompts`).").argument("<project-name>", "Project name").requiredOption("--prompt <text>", `New overall extraction instructions (at most ${MAX_INSTRUCTIONS_LENGTH} characters). Replaces the existing value.`).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(PROJECTS_UPDATE_PROMPT_EXAMPLES).trackedAction(processContext, async (projectName, options) => {
|
|
9864
10359
|
const [err, response] = await catchError((async () => {
|
|
9865
10360
|
const config = await createIxpConfig({
|
|
9866
10361
|
tenant: options.tenant
|
|
@@ -9962,11 +10457,11 @@ var registerProjectsCommand = (program2) => {
|
|
|
9962
10457
|
return;
|
|
9963
10458
|
}
|
|
9964
10459
|
trackShipSucceeded({
|
|
9965
|
-
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
10460
|
+
[ShipDimensions.ShipKind]: "publish",
|
|
10461
|
+
[ShipDimensions.Target]: options.tag ? `ixp_model_${options.tag}` : "ixp_model_untagged",
|
|
10462
|
+
[ShipDimensions.ProjectType]: "ixp_model",
|
|
10463
|
+
[CommandDimensions.CommandName]: "uip ixp projects publish",
|
|
10464
|
+
[ShipDimensions.ArtifactCorrelationKey]: projectName
|
|
9970
10465
|
});
|
|
9971
10466
|
OutputFormatter.success({
|
|
9972
10467
|
Result: "Success",
|
|
@@ -10032,7 +10527,7 @@ var registerProjectsCommand = (program2) => {
|
|
|
10032
10527
|
Data: data
|
|
10033
10528
|
}, { preserveDataKeys: true });
|
|
10034
10529
|
});
|
|
10035
|
-
project.command("create").description("Create an IXP project. Given a folder of documents, uploads them and suggests a taxonomy; without a folder, creates an empty project").argument("<name>",
|
|
10530
|
+
project.command("create").description("Create an IXP project. Given a folder of documents, uploads them and suggests a taxonomy; without a folder, creates an empty project").argument("<name>", `Project name (at most ${MAX_PROJECT_NAME_LENGTH} characters, not counting leading/trailing spaces)`).argument("[folder-path]", "Path to folder containing documents; omit to create an empty project").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("-d, --description <text>", "Description of what to extract from the documents").option("--skip-taxonomy", "Create project and upload docs without suggesting a taxonomy").examples(PROJECTS_CREATE_EXAMPLES).trackedAction(processContext, async (name, folder, options) => {
|
|
10036
10531
|
const [err, result] = await catchError((async () => {
|
|
10037
10532
|
const fs2 = getFileSystem();
|
|
10038
10533
|
const config = await createIxpConfig({
|
|
@@ -10253,4 +10748,4 @@ var registerCommands = async (program2) => {
|
|
|
10253
10748
|
|
|
10254
10749
|
export { package_default, Command, metadata, registerCommands };
|
|
10255
10750
|
|
|
10256
|
-
//# debugId=
|
|
10751
|
+
//# debugId=1C2FD42CEC3010F264756E2164756E21
|
package/dist/tool.js
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/ixp-tool",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.204.0-preview.206",
|
|
6
6
|
"description": "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
|
|
7
7
|
"private": false,
|
|
8
8
|
"repository": {
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "ea7fd32a02acccf14e8e83522e69101430627b83"
|
|
31
31
|
}
|