@uipath/cli 1.203.0-preview.218 → 1.203.0-preview.222
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/THIRD-PARTY-NOTICES.md +2 -2
- package/dist/{cli-fvxb377j.js → cli-fdgbgerr.js} +2 -2
- package/dist/{index-6gze75ak.js → index-etdvrddg.js} +3 -3
- package/dist/{index-f9wx6g0c.js → index-w5wg0cwc.js} +3 -3
- package/dist/index.js +2 -2
- package/dist/{mcp-g5sxmbpy.js → mcp-v3fca4s4.js} +99 -28
- package/dist/{server-h0m5sxy6.js → server-g0x4cwaz.js} +3 -3
- package/dist/{stdio-q0nbdmwt.js → stdio-can24fzp.js} +20 -5
- package/dist/{updateService-g7r80bqh.js → updateService-eg14nh84.js} +1 -1
- package/package.json +2 -2
|
@@ -29,7 +29,7 @@ those licences require.
|
|
|
29
29
|
- @inquirer/prompts@8.5.2 — MIT
|
|
30
30
|
- @inquirer/select@5.2.1 — MIT
|
|
31
31
|
- @microsoft/applicationinsights-web-snippet@1.0.1 — MIT
|
|
32
|
-
- @modelcontextprotocol/sdk@1.
|
|
32
|
+
- @modelcontextprotocol/sdk@1.32.0 — MIT
|
|
33
33
|
- @opentelemetry/api@1.9.1 — Apache-2.0
|
|
34
34
|
- @opentelemetry/api-logs@0.211.0 — Apache-2.0
|
|
35
35
|
- @opentelemetry/core@2.9.0 — Apache-2.0
|
|
@@ -822,7 +822,7 @@ SPDX: MIT
|
|
|
822
822
|
|
|
823
823
|
---
|
|
824
824
|
|
|
825
|
-
## @modelcontextprotocol/sdk@1.
|
|
825
|
+
## @modelcontextprotocol/sdk@1.32.0
|
|
826
826
|
|
|
827
827
|
SPDX: MIT
|
|
828
828
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runNode
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-etdvrddg.js";
|
|
4
4
|
import"./index-vmn69waj.js";
|
|
5
|
-
import"./index-
|
|
5
|
+
import"./index-w5wg0cwc.js";
|
|
6
6
|
import"./index-7pvwjzsq.js";
|
|
7
7
|
import"./index-g8ck9tv6.js";
|
|
8
8
|
import"./index-hrt7fpkk.js";
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
versionLinePrefix,
|
|
109
109
|
versionMigrationNotice,
|
|
110
110
|
withConfigLock
|
|
111
|
-
} from "./index-
|
|
111
|
+
} from "./index-w5wg0cwc.js";
|
|
112
112
|
import {
|
|
113
113
|
CONFIG_FILENAME,
|
|
114
114
|
Command,
|
|
@@ -4390,7 +4390,7 @@ function registerLogoutCommand(program, context) {
|
|
|
4390
4390
|
function registerMcpCommand(program) {
|
|
4391
4391
|
const mcpCommand = program.command("mcp").description("Model Context Protocol (MCP) server");
|
|
4392
4392
|
mcpCommand.command("serve").description("Start the MCP server (stdio transport)").trackedAction(processContext, async () => {
|
|
4393
|
-
const { startMcpServer } = await import("./server-
|
|
4393
|
+
const { startMcpServer } = await import("./server-g0x4cwaz.js");
|
|
4394
4394
|
await startMcpServer(program);
|
|
4395
4395
|
});
|
|
4396
4396
|
}
|
|
@@ -6780,7 +6780,7 @@ async function resolveUpdateLocation(state, context) {
|
|
|
6780
6780
|
return location;
|
|
6781
6781
|
}
|
|
6782
6782
|
async function runUpdateEngine(state, location, context, target) {
|
|
6783
|
-
const { runUpdate: runUpdate2 } = await import("./updateService-
|
|
6783
|
+
const { runUpdate: runUpdate2 } = await import("./updateService-eg14nh84.js");
|
|
6784
6784
|
const spinner = await startSpinner(formatUpdateStartMessage(target));
|
|
6785
6785
|
if (!spinner) {
|
|
6786
6786
|
writeSyncStatus(context, formatUpdateStartMessage(target));
|
|
@@ -551,7 +551,7 @@ var package_default = {
|
|
|
551
551
|
name: "@uipath/cli",
|
|
552
552
|
author: "UiPath",
|
|
553
553
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
554
|
-
version: "1.203.0-preview.
|
|
554
|
+
version: "1.203.0-preview.222",
|
|
555
555
|
description: "Cross platform CLI for UiPath",
|
|
556
556
|
repository: {
|
|
557
557
|
type: "git",
|
|
@@ -591,7 +591,7 @@ var package_default = {
|
|
|
591
591
|
devDependencies: {
|
|
592
592
|
"@ewsjs/ntlm-client": "3.0.1",
|
|
593
593
|
"@inquirer/prompts": "^8.3.2",
|
|
594
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
594
|
+
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
595
595
|
"@playwright/test": "^1.60.0",
|
|
596
596
|
"@types/bun": "^1.3.11",
|
|
597
597
|
"@types/node": "^25.5.2",
|
|
@@ -9721,4 +9721,4 @@ function getManualCommandForInstallError(error, fallback) {
|
|
|
9721
9721
|
|
|
9722
9722
|
export { package_default, VALID_CHANNELS, HIDDEN_CHANNELS, PUBLIC_CHANNELS, withConfigLock, SECRET_FIELD_PATHS, migrateVersionConfig, versionMigrationNotice, resolveConfigFilePathAsync, loadConfigAsync, resolveUpdateChannel, resolveRuntimeChannel, isPreviewVersion, isValidVersionPin, majorOf, resolvePinnedVersion, isExactPin, versionLinePrefix, formatVersionPin, dist_default5 as dist_default, dist_default6 as dist_default1, dist_default7 as dist_default2, getGlobalNpmUipathDir, DISABLE_AUTOINSTALL_ENV, DISABLE_TOOL_LINE_CHECK_ENV, InstallRefusedError, isBundledDistribution, isAutoInstallDisabled, isToolLineCheckDisabled, TOOLS_WHITELIST, COMMAND_ALIASES, ALIASES_BY_COMMAND, WHITELIST_BY_COMMAND, WHITELIST_BY_SHORT_NAME, isValidSemver, compareSemver, resolveToolPackageName, parsePackageSpec, describeCandidateFailure, getEffectiveRegistry, isDevMode, truncateVersionsForDisplay, toolService, SkillSourceError, SkillsRegistryAuthError, resolveSkillSource, getContentStoreForRead, getAvailableSkills, readManifest, removeFromManifest, readExtraFiles, AGENT_DEFS, getSkillsDir, getSkillsDestinationHint, hasDistinctGlobalPath, skillOwnerOf, uninstallExtraFolders, uninstallSkill, rejectIfGlobalOnly, getSkillsSourceFailureDetails, buildSkillCatalog, removeSkillCatalog, searchSkillCatalog, ALL_AGENTS, AGENT_DISPLAY_NAMES, promptAgentSelection, SkillsError, resolveSkillsTargetVersion, resolveRootDir, resolveSkillsContext, runAgentInstalls, runSkillsUpdate, getInstalledTools, toolFailureRemediation, collapsePinnedLineErrors, todayLocal, readState, recordToolUpdateDate, mergeState, TOOLS_UPDATE_PHASES, runToolsUpdate, runUpdate };
|
|
9723
9723
|
|
|
9724
|
-
//# debugId=
|
|
9724
|
+
//# debugId=770BB91792F964F864756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runNode
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-etdvrddg.js";
|
|
5
5
|
import {
|
|
6
6
|
registerRobotClientLoader
|
|
7
7
|
} from "./index-vmn69waj.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-w5wg0cwc.js";
|
|
9
9
|
import {
|
|
10
10
|
TELEMETRY_DRAIN_ARGV,
|
|
11
11
|
configureLogger,
|
|
@@ -10887,17 +10887,34 @@ function normalizeObjectSchema(schema) {
|
|
|
10887
10887
|
}
|
|
10888
10888
|
return;
|
|
10889
10889
|
}
|
|
10890
|
+
function getDotPath(path) {
|
|
10891
|
+
if (path.length === 0) {
|
|
10892
|
+
return "object root";
|
|
10893
|
+
}
|
|
10894
|
+
return path.reduce((acc, seg, index) => {
|
|
10895
|
+
if (index === 0) {
|
|
10896
|
+
return String(seg);
|
|
10897
|
+
}
|
|
10898
|
+
if (typeof seg === "number") {
|
|
10899
|
+
return `${acc}[${seg}]`;
|
|
10900
|
+
}
|
|
10901
|
+
return `${acc}.${seg}`;
|
|
10902
|
+
}, "");
|
|
10903
|
+
}
|
|
10890
10904
|
function getParseErrorMessage(error) {
|
|
10891
10905
|
if (error && typeof error === "object") {
|
|
10906
|
+
if ("issues" in error && Array.isArray(error.issues) && error.issues.length > 0) {
|
|
10907
|
+
return error.issues.map((i) => {
|
|
10908
|
+
if (!i.path?.length) {
|
|
10909
|
+
return i.message;
|
|
10910
|
+
}
|
|
10911
|
+
return `${i.message} at ${getDotPath(i.path)}`;
|
|
10912
|
+
}).join(`
|
|
10913
|
+
`);
|
|
10914
|
+
}
|
|
10892
10915
|
if ("message" in error && typeof error.message === "string") {
|
|
10893
10916
|
return error.message;
|
|
10894
10917
|
}
|
|
10895
|
-
if ("issues" in error && Array.isArray(error.issues) && error.issues.length > 0) {
|
|
10896
|
-
const firstIssue = error.issues[0];
|
|
10897
|
-
if (firstIssue && typeof firstIssue === "object" && "message" in firstIssue) {
|
|
10898
|
-
return String(firstIssue.message);
|
|
10899
|
-
}
|
|
10900
|
-
}
|
|
10901
10918
|
try {
|
|
10902
10919
|
return JSON.stringify(error);
|
|
10903
10920
|
} catch {
|
|
@@ -12268,6 +12285,9 @@ class Protocol {
|
|
|
12268
12285
|
this.setRequestHandler(GetTaskPayloadRequestSchema, async (request, extra) => {
|
|
12269
12286
|
const handleTaskResult = async () => {
|
|
12270
12287
|
const taskId = request.params.taskId;
|
|
12288
|
+
if (!await this._taskStore.getTask(taskId, extra.sessionId)) {
|
|
12289
|
+
throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
|
|
12290
|
+
}
|
|
12271
12291
|
if (this._taskMessageQueue) {
|
|
12272
12292
|
let queuedMessage;
|
|
12273
12293
|
while (queuedMessage = await this._taskMessageQueue.dequeue(taskId, extra.sessionId)) {
|
|
@@ -12298,12 +12318,12 @@ class Protocol {
|
|
|
12298
12318
|
throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
|
|
12299
12319
|
}
|
|
12300
12320
|
if (!isTerminal(task.status)) {
|
|
12301
|
-
await this._waitForTaskUpdate(taskId, extra.signal);
|
|
12321
|
+
await this._waitForTaskUpdate(taskId, extra.signal, extra.sessionId);
|
|
12302
12322
|
return await handleTaskResult();
|
|
12303
12323
|
}
|
|
12304
12324
|
if (isTerminal(task.status)) {
|
|
12305
12325
|
const result = await this._taskStore.getTaskResult(taskId, extra.sessionId);
|
|
12306
|
-
this._clearTaskQueue(taskId);
|
|
12326
|
+
this._clearTaskQueue(taskId, extra.sessionId);
|
|
12307
12327
|
return {
|
|
12308
12328
|
...result,
|
|
12309
12329
|
_meta: {
|
|
@@ -12340,7 +12360,7 @@ class Protocol {
|
|
|
12340
12360
|
throw new McpError(ErrorCode.InvalidParams, `Cannot cancel task in terminal status: ${task.status}`);
|
|
12341
12361
|
}
|
|
12342
12362
|
await this._taskStore.updateTaskStatus(request.params.taskId, "cancelled", "Client cancelled task execution.", extra.sessionId);
|
|
12343
|
-
this._clearTaskQueue(request.params.taskId);
|
|
12363
|
+
this._clearTaskQueue(request.params.taskId, extra.sessionId);
|
|
12344
12364
|
const cancelledTask = await this._taskStore.getTask(request.params.taskId, extra.sessionId);
|
|
12345
12365
|
if (!cancelledTask) {
|
|
12346
12366
|
throw new McpError(ErrorCode.InvalidParams, `Task not found after cancellation: ${request.params.taskId}`);
|
|
@@ -12463,6 +12483,19 @@ class Protocol {
|
|
|
12463
12483
|
const handler = this._requestHandlers.get(request.method) ?? this.fallbackRequestHandler;
|
|
12464
12484
|
const capturedTransport = this._transport;
|
|
12465
12485
|
const relatedTaskId = request.params?._meta?.[RELATED_TASK_META_KEY]?.taskId;
|
|
12486
|
+
const sessionId = capturedTransport?.sessionId;
|
|
12487
|
+
const store = this._taskStore;
|
|
12488
|
+
let relatedTaskFound = true;
|
|
12489
|
+
let relatedTaskLookup;
|
|
12490
|
+
if (relatedTaskId && store && this._taskMessageQueue && sessionId !== undefined) {
|
|
12491
|
+
relatedTaskFound = false;
|
|
12492
|
+
relatedTaskLookup = (async () => {
|
|
12493
|
+
if (!await store.getTask(relatedTaskId, sessionId)) {
|
|
12494
|
+
throw new McpError(ErrorCode.InvalidParams, `Task not found: ${relatedTaskId}`);
|
|
12495
|
+
}
|
|
12496
|
+
relatedTaskFound = true;
|
|
12497
|
+
})();
|
|
12498
|
+
}
|
|
12466
12499
|
if (handler === undefined) {
|
|
12467
12500
|
const errorResponse = {
|
|
12468
12501
|
jsonrpc: "2.0",
|
|
@@ -12472,7 +12505,10 @@ class Protocol {
|
|
|
12472
12505
|
message: "Method not found"
|
|
12473
12506
|
}
|
|
12474
12507
|
};
|
|
12475
|
-
if (relatedTaskId &&
|
|
12508
|
+
if (relatedTaskId && relatedTaskLookup) {
|
|
12509
|
+
const queuedError = { type: "error", message: errorResponse, timestamp: Date.now() };
|
|
12510
|
+
relatedTaskLookup.then(() => this._enqueueTaskMessage(relatedTaskId, queuedError, sessionId), () => capturedTransport?.send(errorResponse)).catch((error) => this._onerror(new Error(`Failed to send an error response: ${error}`)));
|
|
12511
|
+
} else if (relatedTaskId && this._taskMessageQueue) {
|
|
12476
12512
|
this._enqueueTaskMessage(relatedTaskId, {
|
|
12477
12513
|
type: "error",
|
|
12478
12514
|
message: errorResponse,
|
|
@@ -12523,7 +12559,10 @@ class Protocol {
|
|
|
12523
12559
|
closeSSEStream: extra?.closeSSEStream,
|
|
12524
12560
|
closeStandaloneSSEStream: extra?.closeStandaloneSSEStream
|
|
12525
12561
|
};
|
|
12526
|
-
Promise.resolve().then(() => {
|
|
12562
|
+
(relatedTaskLookup ?? Promise.resolve()).then(() => {
|
|
12563
|
+
if (relatedTaskLookup && abortController.signal.aborted) {
|
|
12564
|
+
throw new McpError(ErrorCode.ConnectionClosed, "Request was cancelled");
|
|
12565
|
+
}
|
|
12527
12566
|
if (taskCreationParams) {
|
|
12528
12567
|
this.assertTaskHandlerCapability(request.method);
|
|
12529
12568
|
}
|
|
@@ -12558,7 +12597,7 @@ class Protocol {
|
|
|
12558
12597
|
...error["data"] !== undefined && { data: error["data"] }
|
|
12559
12598
|
}
|
|
12560
12599
|
};
|
|
12561
|
-
if (relatedTaskId && this._taskMessageQueue) {
|
|
12600
|
+
if (relatedTaskId && this._taskMessageQueue && relatedTaskFound) {
|
|
12562
12601
|
await this._enqueueTaskMessage(relatedTaskId, {
|
|
12563
12602
|
type: "error",
|
|
12564
12603
|
message: errorResponse,
|
|
@@ -12946,7 +12985,7 @@ class Protocol {
|
|
|
12946
12985
|
throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");
|
|
12947
12986
|
}
|
|
12948
12987
|
const maxQueueSize = this._options?.maxTaskQueueSize;
|
|
12949
|
-
await this._taskMessageQueue.enqueue(taskId, message, sessionId, maxQueueSize);
|
|
12988
|
+
await this._taskMessageQueue.enqueue(taskId, message, sessionId ?? this._transport?.sessionId, maxQueueSize);
|
|
12950
12989
|
}
|
|
12951
12990
|
async _clearTaskQueue(taskId, sessionId) {
|
|
12952
12991
|
if (this._taskMessageQueue) {
|
|
@@ -12965,10 +13004,10 @@ class Protocol {
|
|
|
12965
13004
|
}
|
|
12966
13005
|
}
|
|
12967
13006
|
}
|
|
12968
|
-
async _waitForTaskUpdate(taskId, signal) {
|
|
13007
|
+
async _waitForTaskUpdate(taskId, signal, sessionId) {
|
|
12969
13008
|
let interval = this._options?.defaultTaskPollInterval ?? 1000;
|
|
12970
13009
|
try {
|
|
12971
|
-
const task = await this._taskStore?.getTask(taskId);
|
|
13010
|
+
const task = await this._taskStore?.getTask(taskId, sessionId);
|
|
12972
13011
|
if (task?.pollInterval) {
|
|
12973
13012
|
interval = task.pollInterval;
|
|
12974
13013
|
}
|
|
@@ -13272,16 +13311,7 @@ class Server extends Protocol {
|
|
|
13272
13311
|
if (!methodSchema) {
|
|
13273
13312
|
throw new Error("Schema is missing a method literal");
|
|
13274
13313
|
}
|
|
13275
|
-
|
|
13276
|
-
if (isZ4Schema(methodSchema)) {
|
|
13277
|
-
const v4Schema = methodSchema;
|
|
13278
|
-
const v4Def = v4Schema._zod?.def;
|
|
13279
|
-
methodValue = v4Def?.value ?? v4Schema.value;
|
|
13280
|
-
} else {
|
|
13281
|
-
const v3Schema = methodSchema;
|
|
13282
|
-
const legacyDef = v3Schema._def;
|
|
13283
|
-
methodValue = legacyDef?.value ?? v3Schema.value;
|
|
13284
|
-
}
|
|
13314
|
+
const methodValue = getLiteralValue(methodSchema);
|
|
13285
13315
|
if (typeof methodValue !== "string") {
|
|
13286
13316
|
throw new Error("Schema method literal must be a string");
|
|
13287
13317
|
}
|
|
@@ -13863,6 +13893,43 @@ class ExperimentalMcpServerTasks {
|
|
|
13863
13893
|
}
|
|
13864
13894
|
|
|
13865
13895
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
|
|
13896
|
+
function toolInputElementCount(value, max) {
|
|
13897
|
+
let count = 0;
|
|
13898
|
+
const stack = [value];
|
|
13899
|
+
while (stack.length > 0) {
|
|
13900
|
+
const node = stack.pop();
|
|
13901
|
+
if (node === null || typeof node !== "object")
|
|
13902
|
+
continue;
|
|
13903
|
+
if (Array.isArray(node)) {
|
|
13904
|
+
for (const child of node) {
|
|
13905
|
+
if (++count > max)
|
|
13906
|
+
return count;
|
|
13907
|
+
if (child !== null && typeof child === "object")
|
|
13908
|
+
stack.push(child);
|
|
13909
|
+
}
|
|
13910
|
+
} else {
|
|
13911
|
+
for (const key in node) {
|
|
13912
|
+
if (!Object.prototype.hasOwnProperty.call(node, key))
|
|
13913
|
+
continue;
|
|
13914
|
+
if (++count > max)
|
|
13915
|
+
return count;
|
|
13916
|
+
const child = node[key];
|
|
13917
|
+
if (child !== null && typeof child === "object")
|
|
13918
|
+
stack.push(child);
|
|
13919
|
+
}
|
|
13920
|
+
}
|
|
13921
|
+
}
|
|
13922
|
+
return count;
|
|
13923
|
+
}
|
|
13924
|
+
function resolveMaxToolInputElements(value) {
|
|
13925
|
+
if (value === undefined || value === Infinity)
|
|
13926
|
+
return;
|
|
13927
|
+
if (typeof value !== "number" || Number.isNaN(value) || value < 1) {
|
|
13928
|
+
throw new RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(value)}`);
|
|
13929
|
+
}
|
|
13930
|
+
return value;
|
|
13931
|
+
}
|
|
13932
|
+
|
|
13866
13933
|
class McpServer {
|
|
13867
13934
|
constructor(serverInfo, options) {
|
|
13868
13935
|
this._registeredResources = {};
|
|
@@ -13874,6 +13941,7 @@ class McpServer {
|
|
|
13874
13941
|
this._resourceHandlersInitialized = false;
|
|
13875
13942
|
this._promptHandlersInitialized = false;
|
|
13876
13943
|
this.server = new Server(serverInfo, options);
|
|
13944
|
+
this._maxToolInputElements = resolveMaxToolInputElements(options?.maxToolInputElements);
|
|
13877
13945
|
}
|
|
13878
13946
|
get experimental() {
|
|
13879
13947
|
if (!this._experimental) {
|
|
@@ -13980,12 +14048,15 @@ class McpServer {
|
|
|
13980
14048
|
};
|
|
13981
14049
|
}
|
|
13982
14050
|
async validateToolInput(tool, args, toolName) {
|
|
14051
|
+
if (this._maxToolInputElements !== undefined && toolInputElementCount(args, this._maxToolInputElements) > this._maxToolInputElements) {
|
|
14052
|
+
throw new McpError(ErrorCode.InvalidParams, `Invalid arguments for tool ${toolName}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);
|
|
14053
|
+
}
|
|
13983
14054
|
if (!tool.inputSchema) {
|
|
13984
14055
|
return;
|
|
13985
14056
|
}
|
|
13986
14057
|
const inputObj = normalizeObjectSchema(tool.inputSchema);
|
|
13987
14058
|
const schemaToParse = inputObj ?? tool.inputSchema;
|
|
13988
|
-
const parseResult = await safeParseAsync2(schemaToParse, args);
|
|
14059
|
+
const parseResult = await safeParseAsync2(schemaToParse, args ?? {});
|
|
13989
14060
|
if (!parseResult.success) {
|
|
13990
14061
|
const error = "error" in parseResult ? parseResult.error : "Unknown error";
|
|
13991
14062
|
const errorMessage = getParseErrorMessage(error);
|
|
@@ -14210,7 +14281,7 @@ class McpServer {
|
|
|
14210
14281
|
}
|
|
14211
14282
|
if (prompt.argsSchema) {
|
|
14212
14283
|
const argsObj = normalizeObjectSchema(prompt.argsSchema);
|
|
14213
|
-
const parseResult = await safeParseAsync2(argsObj, request.params.arguments);
|
|
14284
|
+
const parseResult = await safeParseAsync2(argsObj, request.params.arguments ?? {});
|
|
14214
14285
|
if (!parseResult.success) {
|
|
14215
14286
|
const error = "error" in parseResult ? parseResult.error : "Unknown error";
|
|
14216
14287
|
const errorMessage = getParseErrorMessage(error);
|
|
@@ -14608,4 +14679,4 @@ export {
|
|
|
14608
14679
|
ResourceTemplate
|
|
14609
14680
|
};
|
|
14610
14681
|
|
|
14611
|
-
//# debugId=
|
|
14682
|
+
//# debugId=3C05CADF2E0DD42D64756E2164756E21
|
|
@@ -84,7 +84,7 @@ async function executeCommand(command) {
|
|
|
84
84
|
const previousSink = getOutputSink();
|
|
85
85
|
setGlobalSink(sink);
|
|
86
86
|
const [error] = await catchError(async () => {
|
|
87
|
-
const { run } = await import("./cli-
|
|
87
|
+
const { run } = await import("./cli-fdgbgerr.js");
|
|
88
88
|
await runWithAuthProfile(undefined, () => runWithSink(sink, () => run(context)));
|
|
89
89
|
});
|
|
90
90
|
if (error) {
|
|
@@ -140,8 +140,8 @@ Pass the command without the 'uip' prefix. Example: "login status --output json"
|
|
|
140
140
|
|
|
141
141
|
// src/mcp/server.ts
|
|
142
142
|
async function startMcpServer(program) {
|
|
143
|
-
const { McpServer } = await import("./mcp-
|
|
144
|
-
const { StdioServerTransport } = await import("./stdio-
|
|
143
|
+
const { McpServer } = await import("./mcp-v3fca4s4.js");
|
|
144
|
+
const { StdioServerTransport } = await import("./stdio-can24fzp.js");
|
|
145
145
|
const toolDescription = introspectCommands(program);
|
|
146
146
|
const server = new McpServer({
|
|
147
147
|
name: "uipath-cli",
|
|
@@ -8,8 +8,18 @@ import"./index-1yh8g550.js";
|
|
|
8
8
|
import process from "node:process";
|
|
9
9
|
|
|
10
10
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
11
|
+
var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
12
|
+
|
|
11
13
|
class ReadBuffer {
|
|
14
|
+
constructor(options) {
|
|
15
|
+
this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
|
|
16
|
+
}
|
|
12
17
|
append(chunk) {
|
|
18
|
+
const newSize = (this._buffer?.length ?? 0) + chunk.length;
|
|
19
|
+
if (newSize > this._maxBufferSize) {
|
|
20
|
+
this.clear();
|
|
21
|
+
throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
|
|
22
|
+
}
|
|
13
23
|
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
14
24
|
}
|
|
15
25
|
readMessage() {
|
|
@@ -39,18 +49,23 @@ function serializeMessage(message) {
|
|
|
39
49
|
|
|
40
50
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
41
51
|
class StdioServerTransport {
|
|
42
|
-
constructor(_stdin = process.stdin, _stdout = process.stdout) {
|
|
52
|
+
constructor(_stdin = process.stdin, _stdout = process.stdout, options) {
|
|
43
53
|
this._stdin = _stdin;
|
|
44
54
|
this._stdout = _stdout;
|
|
45
|
-
this._readBuffer = new ReadBuffer;
|
|
46
55
|
this._started = false;
|
|
47
56
|
this._ondata = (chunk) => {
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
try {
|
|
58
|
+
this._readBuffer.append(chunk);
|
|
59
|
+
this.processReadBuffer();
|
|
60
|
+
} catch (error) {
|
|
61
|
+
this.onerror?.(error);
|
|
62
|
+
this.close().catch(() => {});
|
|
63
|
+
}
|
|
50
64
|
};
|
|
51
65
|
this._onerror = (error) => {
|
|
52
66
|
this.onerror?.(error);
|
|
53
67
|
};
|
|
68
|
+
this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
|
|
54
69
|
}
|
|
55
70
|
async start() {
|
|
56
71
|
if (this._started) {
|
|
@@ -98,4 +113,4 @@ export {
|
|
|
98
113
|
StdioServerTransport
|
|
99
114
|
};
|
|
100
115
|
|
|
101
|
-
//# debugId=
|
|
116
|
+
//# debugId=8DAAD45B1FBE1C6564756E2164756E21
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/cli",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.203.0-preview.
|
|
5
|
+
"version": "1.203.0-preview.222",
|
|
6
6
|
"description": "Cross platform CLI for UiPath",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"kerberos": "7.0.0",
|
|
37
37
|
"node-expose-sspi": "0.1.60"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "12a014419d2fcd64b661bf97ff2dfc8b26343115"
|
|
40
40
|
}
|