@uipath/agenthub-tool 1.205.0-preview.277 → 1.206.0-preview.279

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 ADDED
@@ -0,0 +1,49 @@
1
+ # @uipath/agenthub-tool
2
+
3
+ `uip` plugin for UiPath AgentHub. It adds `uip agenthub`, which manages MCP
4
+ server registrations (uipath, coded, command, remote, platform and swagger
5
+ servers), the tools on those servers, the Platform MCP services a tenant
6
+ offers, and remote A2A agents. These are the tools the platform exposes to
7
+ coded and low-code agents.
8
+
9
+ Full guide: [docs/tools/agenthub.md](../../docs/tools/agenthub.md).
10
+
11
+ ## Commands
12
+
13
+ | Command | Purpose |
14
+ | --- | --- |
15
+ | `uip agenthub mcp list` / `get <slug>` | List MCP server registrations, or get one by slug. |
16
+ | `uip agenthub mcp create <type>` | Create a server: `uipath`, `coded`, `command`, `remote`, `platform` or `swagger`. |
17
+ | `uip agenthub mcp update <slug>` / `delete <slug>` | Change or remove a server. |
18
+ | `uip agenthub mcp template <type>` | Print a JSON skeleton to edit and pass with `--file` or `--body`. |
19
+ | `uip agenthub mcp refresh-tools <slug>` | Re-derive the tools of a server. |
20
+ | `uip agenthub mcp-tools list` / `get` | List or get the tools on a server (`--mcp <slug>`). |
21
+ | `uip agenthub mcp-tools create-resource` / `create-raw` / `update` / `delete` | Manage tools on a uipath MCP server. |
22
+ | `uip agenthub mcp-tools candidates` | List the processes, agents and API workflows `create-resource` can point at. |
23
+ | `uip agenthub mcp-tools enable` / `disable` | Turn platform MCP tools on or off. |
24
+ | `uip agenthub platform-services list` | List the first-party services offered as Platform MCP servers. |
25
+ | `uip agenthub platform-tools list --service <service>` | List the tools one Platform MCP service offers. |
26
+ | `uip agenthub remote-a2a-agent list` / `get` / `create` / `update` / `delete` / `refresh-card` | Manage remote A2A agents. |
27
+
28
+ Create and update verbs take flags, or a whole payload with `--file` or
29
+ `--body`; `--dry-run` shows the request without sending it, and `--print-schema`
30
+ prints the payload schema.
31
+
32
+ ## Examples
33
+
34
+ ```bash
35
+ uip agenthub mcp list --folder-path <folder-path>
36
+ uip agenthub mcp template remote
37
+ uip agenthub mcp create remote --name "Weather" --uri https://example.com/mcp --folder-path <folder-path> --dry-run
38
+ uip agenthub mcp-tools list --mcp <slug> --folder-path <folder-path>
39
+ uip agenthub mcp-tools candidates --category automation --folder-path <folder-path>
40
+ uip agenthub platform-services list
41
+ uip agenthub remote-a2a-agent get <slug> --folder-path <folder-path>
42
+ ```
43
+
44
+ ## Authentication
45
+
46
+ Needs `uip login` first. Server, tool and remote A2A agent registrations live
47
+ in an Orchestrator folder, so those commands need `--folder-path` or
48
+ `--folder-key` (`mcp list` also takes `--all-folders`). Platform services and
49
+ platform tools are tenant-wide.
@@ -5,7 +5,7 @@ compiled into its `dist/` output rather than installed alongside it.
5
5
  Their licences and copyright notices are reproduced here in full, as
6
6
  those licences require.
7
7
 
8
- 15 bundled dependencies:
8
+ 17 bundled dependencies:
9
9
 
10
10
  - bundle-name@4.1.0 — MIT
11
11
  - commander@14.0.3 — MIT
@@ -18,7 +18,9 @@ those licences require.
18
18
  - is-wsl@3.1.1 — MIT
19
19
  - jmespath@0.16.0 — Apache-2.0
20
20
  - js-yaml@4.3.2 — MIT
21
+ - oauth4webapi@3.8.6 — MIT
21
22
  - open@11.0.0 — MIT
23
+ - openid-client@6.8.4 — MIT
22
24
  - powershell-utils@0.1.0 — MIT
23
25
  - run-applescript@7.1.0 — MIT
24
26
  - wsl-utils@0.3.1 — MIT
@@ -252,6 +254,36 @@ THE SOFTWARE.
252
254
 
253
255
  ---
254
256
 
257
+ ## oauth4webapi@3.8.6
258
+
259
+ SPDX: MIT
260
+
261
+ ```
262
+ The MIT License (MIT)
263
+
264
+ Copyright (c) 2022 Filip Skokan
265
+
266
+ Permission is hereby granted, free of charge, to any person obtaining a copy
267
+ of this software and associated documentation files (the "Software"), to deal
268
+ in the Software without restriction, including without limitation the rights
269
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
270
+ copies of the Software, and to permit persons to whom the Software is
271
+ furnished to do so, subject to the following conditions:
272
+
273
+ The above copyright notice and this permission notice shall be included in all
274
+ copies or substantial portions of the Software.
275
+
276
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
277
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
278
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
279
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
280
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
281
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
282
+ SOFTWARE.
283
+ ```
284
+
285
+ ---
286
+
255
287
  ## open@11.0.0
256
288
 
257
289
  SPDX: MIT
@@ -270,6 +302,36 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
270
302
 
271
303
  ---
272
304
 
305
+ ## openid-client@6.8.4
306
+
307
+ SPDX: MIT
308
+
309
+ ```
310
+ The MIT License (MIT)
311
+
312
+ Copyright (c) 2016 Filip Skokan
313
+
314
+ Permission is hereby granted, free of charge, to any person obtaining a copy
315
+ of this software and associated documentation files (the "Software"), to deal
316
+ in the Software without restriction, including without limitation the rights
317
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
318
+ copies of the Software, and to permit persons to whom the Software is
319
+ furnished to do so, subject to the following conditions:
320
+
321
+ The above copyright notice and this permission notice shall be included in all
322
+ copies or substantial portions of the Software.
323
+
324
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
325
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
326
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
327
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
328
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
329
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
330
+ SOFTWARE.
331
+ ```
332
+
333
+ ---
334
+
273
335
  ## powershell-utils@0.1.0
274
336
 
275
337
  SPDX: MIT
@@ -0,0 +1,98 @@
1
+ import {
2
+ AUTH_CANCELLED_ERROR_CODE
3
+ } from "./tool-1qg04b7q.js";
4
+ import {
5
+ getGlobalThis
6
+ } from "./tool-2rwzcase.js";
7
+
8
+ // ../auth/src/strategies/browser-strategy.ts
9
+ class BrowserAuthStrategy {
10
+ async execute(url, _redirectUri, expectedState, opts) {
11
+ const global = getGlobalThis();
12
+ if (!global?.window) {
13
+ throw new Error("Browser environment required for authentication");
14
+ }
15
+ const screenWidth = global.window.screen?.width ?? 1024;
16
+ const screenHeight = global.window.screen?.height ?? 768;
17
+ const width = 600;
18
+ const height = 700;
19
+ const left = screenWidth / 2 - width / 2;
20
+ const top = screenHeight / 2 - height / 2;
21
+ if (!global.window.open) {
22
+ throw new Error("window.open is not available");
23
+ }
24
+ const popupResult = global.window.open(url, "uip_auth", `width=${width},height=${height},left=${left},top=${top},resizable=yes,scrollbars=yes,status=yes`);
25
+ const popup = popupResult;
26
+ if (!popup) {
27
+ throw new Error(`Authentication popup was blocked by your browser.
28
+
29
+ ` + `To continue:
30
+ ` + `1. Look for a popup blocker icon in your address bar
31
+ ` + `2. Allow popups for this site
32
+ ` + `3. Try logging in again
33
+
34
+ ` + "If using an ad blocker, you may need to temporarily disable it.");
35
+ }
36
+ return new Promise((resolve, reject) => {
37
+ let timer;
38
+ const messageHandler = (event) => {
39
+ if (event.data?.type === "UIP_AUTH_CODE" && event.data.code) {
40
+ if (event.data.state !== expectedState) {
41
+ cleanup();
42
+ reject(new Error("OAuth state mismatch — the callback state does not match the expected value. " + "This may indicate a CSRF attack. Please try signing in again."));
43
+ popup.close();
44
+ return;
45
+ }
46
+ cleanup();
47
+ resolve(event.data.code);
48
+ popup.close();
49
+ } else if (event.data?.type === "UIP_AUTH_ERROR") {
50
+ cleanup();
51
+ const errorMsg = event.data.error || "Authentication failed";
52
+ reject(new Error(`Authentication failed: ${errorMsg}
53
+
54
+ ` + "Please check your credentials and try again. " + "If the problem persists, verify your UiPath account is active."));
55
+ popup.close();
56
+ }
57
+ };
58
+ const cleanup = () => {
59
+ global.window?.removeEventListener?.("message", messageHandler);
60
+ opts?.signal?.removeEventListener("abort", onAbort);
61
+ if (timer)
62
+ clearInterval(timer);
63
+ };
64
+ const onAbort = () => {
65
+ cleanup();
66
+ const err = new Error(`Authentication was cancelled.
67
+
68
+ ` + "The sign-in was cancelled before completing the login process. " + "Please try again and complete the authentication flow.");
69
+ err.code = AUTH_CANCELLED_ERROR_CODE;
70
+ reject(err);
71
+ popup.close();
72
+ };
73
+ if (opts?.signal) {
74
+ if (opts.signal.aborted) {
75
+ onAbort();
76
+ return;
77
+ }
78
+ opts.signal.addEventListener("abort", onAbort, { once: true });
79
+ }
80
+ if (global.window?.addEventListener) {
81
+ global.window.addEventListener("message", messageHandler);
82
+ }
83
+ timer = setInterval(() => {
84
+ if (popup.closed) {
85
+ cleanup();
86
+ reject(new Error(`Authentication was cancelled.
87
+
88
+ ` + "The authentication popup was closed before completing the login process. " + "Please try again and complete the authentication flow."));
89
+ }
90
+ }, 1000);
91
+ });
92
+ }
93
+ }
94
+ export {
95
+ BrowserAuthStrategy
96
+ };
97
+
98
+ //# debugId=65561DFA5EC07C3664756E2164756E21