@uipath/codedagent-tool 1.205.0-preview.281 → 1.206.0-preview.282
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/README.md +34 -6
- package/dist/{index-sby22td6.js → index-nzr4mx5p.js} +2 -22
- package/dist/index.js +8 -9
- package/dist/init.js +4 -5
- package/dist/{jmespath-231m3hyn.js → jmespath-ab6tdc42.js} +1 -1
- package/dist/{js-yaml-88tdqrtd.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/{tool-kh9ddkna.js → tool-15c9bc3a.js} +1615 -586
- package/dist/{tool-0jywrjjt.js → tool-5t5a0c8c.js} +38 -43
- package/dist/{tool-1de529jm.js → tool-epsr41wx.js} +12 -3
- package/dist/tool.js +7 -8
- package/package.json +2 -2
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
getFileSystem,
|
|
3
3
|
CommandDimensions,
|
|
4
|
-
OutputFormatter,
|
|
5
|
-
RESULTS,
|
|
6
4
|
ShipDimensions,
|
|
7
|
-
WHITELISTED_COMMANDS,
|
|
8
5
|
catchError,
|
|
9
|
-
codedAgentCommandPreflight,
|
|
10
|
-
createExecuteCommand,
|
|
11
|
-
createSetupCommand,
|
|
12
6
|
extractErrorMessageSync,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
parseJWT,
|
|
7
|
+
RESULTS,
|
|
8
|
+
OutputFormatter,
|
|
16
9
|
processContext,
|
|
17
|
-
trackShipSucceeded
|
|
18
|
-
|
|
10
|
+
trackShipSucceeded,
|
|
11
|
+
parseJWT,
|
|
12
|
+
getLoginStatusAsync,
|
|
13
|
+
getAuthContext,
|
|
14
|
+
createExecuteCommand,
|
|
15
|
+
createSetupCommand,
|
|
16
|
+
WHITELISTED_COMMANDS,
|
|
17
|
+
COMMAND_RULES,
|
|
18
|
+
codedAgentCommandPreflight
|
|
19
|
+
} from "./tool-15c9bc3a.js";
|
|
19
20
|
// package.json
|
|
20
21
|
var package_default = {
|
|
21
22
|
name: "@uipath/codedagent-tool",
|
|
22
23
|
author: "UiPath",
|
|
23
24
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
24
|
-
version: "1.
|
|
25
|
+
version: "1.206.0-preview.282",
|
|
25
26
|
description: "Build, run, deploy, and manage AI Agents.",
|
|
26
27
|
keywords: [
|
|
27
28
|
"cli-tool",
|
|
@@ -54,6 +55,7 @@ var package_default = {
|
|
|
54
55
|
},
|
|
55
56
|
scripts: {
|
|
56
57
|
build: "bun ../../tools/build-tool.ts && tsc -p tsconfig.build.json --noCheck",
|
|
58
|
+
typecheck: "tsc --noEmit",
|
|
57
59
|
package: "bun run build && bun pm pack",
|
|
58
60
|
test: "vitest run",
|
|
59
61
|
"test:coverage": "vitest run --coverage",
|
|
@@ -636,19 +638,14 @@ var SERVICE_PATH = {
|
|
|
636
638
|
"llm-gateway": "llmgateway_"
|
|
637
639
|
};
|
|
638
640
|
var REQUESTING_PRODUCT = "uipath-cli";
|
|
639
|
-
async function
|
|
640
|
-
const
|
|
641
|
-
ensureTokenValidityMinutes: options?.loginValidity
|
|
641
|
+
async function resolveAuth(options) {
|
|
642
|
+
const auth = await getAuthContext({
|
|
643
|
+
ensureTokenValidityMinutes: options?.loginValidity,
|
|
644
|
+
requireOrganizationId: true
|
|
642
645
|
});
|
|
643
|
-
if (status.loginStatus !== "Logged in" || !status.baseUrl || !status.accessToken) {
|
|
644
|
-
throw new Error(status.hint ? `Not logged in. ${status.hint}` : "Not logged in. Run 'uip login' first.");
|
|
645
|
-
}
|
|
646
|
-
if (!status.organizationId) {
|
|
647
|
-
throw new Error("Organization ID not available. Ensure you are logged in with an organization context.");
|
|
648
|
-
}
|
|
649
646
|
return {
|
|
650
|
-
|
|
651
|
-
bearerToken: options?.s2sToken ??
|
|
647
|
+
auth,
|
|
648
|
+
bearerToken: options?.s2sToken ?? auth.accessToken
|
|
652
649
|
};
|
|
653
650
|
}
|
|
654
651
|
function stripTrailingSlash(s) {
|
|
@@ -679,28 +676,26 @@ async function readErrorBody(response) {
|
|
|
679
676
|
return `${response.status} ${response.statusText}: ${text.slice(0, 1000)}`;
|
|
680
677
|
}
|
|
681
678
|
async function createAiHttpContext(service, options) {
|
|
682
|
-
const {
|
|
683
|
-
const explicitTenantOverride = options?.tenantName
|
|
684
|
-
const tenantName = options?.tenantName
|
|
685
|
-
const tenantSegment = explicitTenantOverride ? options?.tenantName :
|
|
679
|
+
const { auth, bearerToken } = await resolveAuth(options);
|
|
680
|
+
const explicitTenantOverride = Boolean(options?.tenantName);
|
|
681
|
+
const tenantName = options?.tenantName || auth.tenantName;
|
|
682
|
+
const tenantSegment = explicitTenantOverride ? options?.tenantName : auth.tenantId ?? auth.tenantName;
|
|
686
683
|
const segments = [
|
|
687
|
-
|
|
688
|
-
|
|
684
|
+
stripTrailingSlash(auth.baseUrl),
|
|
685
|
+
encodeURIComponent(auth.organizationId)
|
|
689
686
|
];
|
|
690
687
|
if (tenantSegment) {
|
|
691
688
|
segments.push(encodeURIComponent(tenantSegment));
|
|
692
689
|
}
|
|
693
690
|
segments.push(SERVICE_PATH[service]);
|
|
694
|
-
const baseUrl = segments.
|
|
691
|
+
const baseUrl = segments.join("/");
|
|
695
692
|
const baseHeaders = {
|
|
696
693
|
Authorization: `Bearer ${bearerToken}`,
|
|
697
|
-
Accept: "application/json"
|
|
694
|
+
Accept: "application/json",
|
|
695
|
+
"x-uipath-internal-accountid": auth.organizationId
|
|
698
696
|
};
|
|
699
|
-
if (
|
|
700
|
-
baseHeaders["x-uipath-internal-
|
|
701
|
-
}
|
|
702
|
-
if (!explicitTenantOverride && status.tenantId) {
|
|
703
|
-
baseHeaders["x-uipath-internal-tenantid"] = status.tenantId;
|
|
697
|
+
if (!explicitTenantOverride && auth.tenantId) {
|
|
698
|
+
baseHeaders["x-uipath-internal-tenantid"] = auth.tenantId;
|
|
704
699
|
}
|
|
705
700
|
baseHeaders["x-uipath-requestingproduct"] = REQUESTING_PRODUCT;
|
|
706
701
|
baseHeaders["X-UiPath-LLMGateway-AllowFull4xxResponse"] = "true";
|
|
@@ -749,8 +744,8 @@ async function createAiHttpContext(service, options) {
|
|
|
749
744
|
};
|
|
750
745
|
return {
|
|
751
746
|
baseUrl,
|
|
752
|
-
organizationId:
|
|
753
|
-
tenantId: explicitTenantOverride ? undefined :
|
|
747
|
+
organizationId: auth.organizationId,
|
|
748
|
+
tenantId: explicitTenantOverride ? undefined : auth.tenantId,
|
|
754
749
|
tenantName,
|
|
755
750
|
requestingProduct: REQUESTING_PRODUCT,
|
|
756
751
|
fetchJson,
|
|
@@ -960,7 +955,7 @@ var PROJECT_ID_INSTRUCTIONS = [
|
|
|
960
955
|
" uip codedagent push"
|
|
961
956
|
].join(`
|
|
962
957
|
`);
|
|
963
|
-
var
|
|
958
|
+
var metadata2 = {
|
|
964
959
|
name: "codedagent-tool",
|
|
965
960
|
version: package_default.version,
|
|
966
961
|
description: "Build, run, deploy, and manage AI Agents.",
|
|
@@ -1016,7 +1011,7 @@ var registerWhitelistedCommand = (program, name, description) => {
|
|
|
1016
1011
|
}
|
|
1017
1012
|
});
|
|
1018
1013
|
};
|
|
1019
|
-
var
|
|
1014
|
+
var registerCommands2 = async (program) => {
|
|
1020
1015
|
registerSetupCommand(program);
|
|
1021
1016
|
registerReviewCommand(program);
|
|
1022
1017
|
for (const { name, description } of WHITELISTED_COMMANDS) {
|
|
@@ -1025,6 +1020,6 @@ var registerCommands = async (program) => {
|
|
|
1025
1020
|
program.showHelpAfterError(false);
|
|
1026
1021
|
};
|
|
1027
1022
|
|
|
1028
|
-
export {
|
|
1023
|
+
export { metadata2, registerCommands2 };
|
|
1029
1024
|
|
|
1030
|
-
//# debugId=
|
|
1025
|
+
//# debugId=F947E154636FD9AC64756E2164756E21
|
|
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
18
18
|
return cached;
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
22
|
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
23
|
for (let key of __getOwnPropNames(mod))
|
|
24
24
|
if (!__hasOwnProp.call(to, key))
|
|
@@ -32,8 +32,17 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
32
32
|
return to;
|
|
33
33
|
};
|
|
34
34
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
35
|
+
var __exportCjs = (target, getters, setters) => {
|
|
36
|
+
for (var name in getters)
|
|
37
|
+
__defProp(target, name, {
|
|
38
|
+
get: getters[name],
|
|
39
|
+
set: setters[name],
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true
|
|
42
|
+
});
|
|
43
|
+
};
|
|
35
44
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
36
45
|
|
|
37
|
-
export { __toESM, __commonJS, __require };
|
|
46
|
+
export { __toESM, __commonJS, __exportCjs, __require };
|
|
38
47
|
|
|
39
|
-
//# debugId=
|
|
48
|
+
//# debugId=6692E9B4C735B07364756E2164756E21
|
package/dist/tool.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./tool-
|
|
5
|
-
import"./tool-
|
|
6
|
-
import"./tool-1de529jm.js";
|
|
2
|
+
metadata2,
|
|
3
|
+
registerCommands2
|
|
4
|
+
} from "./tool-5t5a0c8c.js";
|
|
5
|
+
import"./tool-15c9bc3a.js";
|
|
7
6
|
export {
|
|
8
|
-
metadata,
|
|
9
|
-
registerCommands
|
|
7
|
+
metadata2 as metadata,
|
|
8
|
+
registerCommands2 as registerCommands
|
|
10
9
|
};
|
|
11
10
|
|
|
12
|
-
//# debugId=
|
|
11
|
+
//# debugId=70F1AD7F6A314C7564756E2164756E21
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/codedagent-tool",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.206.0-preview.282",
|
|
6
6
|
"description": "Build, run, deploy, and manage AI Agents.",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"cli-tool",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"registry": "https://registry.npmjs.org/"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "9f18b69f2307838e3ce650b91de76cf6c9a23c13"
|
|
37
37
|
}
|