@uipath/llmgw-tool 1.198.0 → 1.199.0-preview.105

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.
Files changed (2) hide show
  1. package/dist/tool.js +18 -9
  2. package/package.json +2 -2
package/dist/tool.js CHANGED
@@ -4,7 +4,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
4
4
  var package_default = {
5
5
  name: "@uipath/llmgw-tool",
6
6
  license: "MIT",
7
- version: "1.198.0",
7
+ version: "1.199.0-preview.105",
8
8
  description: "CLI plugin for UiPath AI Trust Layer Bring-Your-Own LLM connections.",
9
9
  private: false,
10
10
  repository: {
@@ -916,6 +916,7 @@ function settlePromiseLike(thenable) {
916
916
  var DEFAULT_401 = "Unauthorized (401). Run `uip login` to authenticate.";
917
917
  var DEFAULT_403 = "Forbidden (403). Ensure the account has the required permissions.";
918
918
  var DEFAULT_405 = "Method Not Allowed (405). The endpoint may not exist or the base URL may be incorrect.";
919
+ 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.";
919
920
  var HTML_RESPONSE_MESSAGE = "Received HTML instead of the expected JSON response.";
920
921
  var NETWORK_ERROR_CODES = new Set([
921
922
  "ECONNREFUSED",
@@ -1017,6 +1018,9 @@ function classifyError(status, error) {
1017
1018
  if (status === 405) {
1018
1019
  return { errorCode: "method_not_allowed", retry: "RetryWillNotFix" };
1019
1020
  }
1021
+ if (status === 413) {
1022
+ return { errorCode: "invalid_argument", retry: "RetryWillNotFix" };
1023
+ }
1020
1024
  if (status === 408) {
1021
1025
  return { errorCode: "timeout", retry: "RetryLater" };
1022
1026
  }
@@ -1094,6 +1098,8 @@ async function extractErrorDetails(error, options) {
1094
1098
  result = "AuthenticationError";
1095
1099
  } else if (status === 405) {
1096
1100
  message = DEFAULT_405;
1101
+ } else if (status === 413) {
1102
+ message = DEFAULT_413;
1097
1103
  } else if (status === 400 || status === 422) {
1098
1104
  message = formatHttpStatusMessage(status, rawMessage, extractedMessage, inferredStatus);
1099
1105
  result = "ValidationError";
@@ -7963,6 +7969,7 @@ var SKILL_ATTRIBUTION = attributionRecord([
7963
7969
  var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
7964
7970
  var COMMAND_ATTRIBUTION = commandAttribution([
7965
7971
  ["cli", "troubleshoot", ["uip.feedback"]],
7972
+ ["llm-gateway", "operate", ["uip.llm-gateway"]],
7966
7973
  ["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
7967
7974
  ["context-grounding", "build", ["uip.context-grounding"]],
7968
7975
  ["api-workflow", "build", ["uip.api-workflow"]],
@@ -27051,6 +27058,7 @@ var resolveConfigAsync = async ({
27051
27058
  customAuthority,
27052
27059
  customClientId,
27053
27060
  customClientSecret,
27061
+ customClientAssertion,
27054
27062
  customScopes
27055
27063
  } = {}) => {
27056
27064
  const fileAuth = getAuthFileConfig();
@@ -27076,7 +27084,7 @@ var resolveConfigAsync = async ({
27076
27084
  if (!clientSecret && fileAuth.clientSecret) {
27077
27085
  clientSecret = fileAuth.clientSecret;
27078
27086
  }
27079
- const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && Boolean(clientSecret);
27087
+ const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && (Boolean(clientSecret) || Boolean(customClientAssertion));
27080
27088
  const scopes = resolveScopes(isExternalAppAuth, customScopes, fileAuth.scopes);
27081
27089
  return {
27082
27090
  clientId,
@@ -28353,6 +28361,7 @@ function connectorsSupportingFlavors(flavors, connectorApiFlavors) {
28353
28361
  }
28354
28362
 
28355
28363
  // src/commands/byo-connections/internal/helpers.ts
28364
+ import { InvalidArgumentError as InvalidArgumentError2 } from "commander";
28356
28365
  var MAPPING_REQUIRED_KEYS = [
28357
28366
  "llm-name",
28358
28367
  "llm-identifier",
@@ -28378,30 +28387,30 @@ function parseMapping(raw) {
28378
28387
  const seenKebab = new Set;
28379
28388
  const segments = raw.split(",").map((s) => s.trim()).filter((s) => s.length > 0);
28380
28389
  if (segments.length === 0) {
28381
- throw new Error("Empty --mapping. Expected key=value,key=value,... with required keys: " + MAPPING_REQUIRED_KEYS.join(", "));
28390
+ throw new InvalidArgumentError2("Empty --mapping. Expected key=value,key=value,... with required keys: " + MAPPING_REQUIRED_KEYS.join(", "));
28382
28391
  }
28383
28392
  for (const segment of segments) {
28384
28393
  const eq = segment.indexOf("=");
28385
28394
  if (eq <= 0) {
28386
- throw new Error(`Malformed --mapping entry '${segment}'. Each segment must be 'key=value'.`);
28395
+ throw new InvalidArgumentError2(`Malformed --mapping entry '${segment}'. Each segment must be 'key=value'.`);
28387
28396
  }
28388
28397
  const key = segment.slice(0, eq).trim();
28389
28398
  const value = segment.slice(eq + 1).trim();
28390
28399
  if (!MAPPING_ALL_KEYS.has(key)) {
28391
- throw new Error(`Unknown --mapping key '${key}'. Allowed: ${[...MAPPING_REQUIRED_KEYS, ...MAPPING_OPTIONAL_KEYS].join(", ")}.`);
28400
+ throw new InvalidArgumentError2(`Unknown --mapping key '${key}'. Allowed: ${[...MAPPING_REQUIRED_KEYS, ...MAPPING_OPTIONAL_KEYS].join(", ")}.`);
28392
28401
  }
28393
28402
  if (seenKebab.has(key)) {
28394
- throw new Error(`Duplicate --mapping key '${key}'.`);
28403
+ throw new InvalidArgumentError2(`Duplicate --mapping key '${key}'.`);
28395
28404
  }
28396
28405
  if (!value) {
28397
- throw new Error(`--mapping key '${key}' has empty value.`);
28406
+ throw new InvalidArgumentError2(`--mapping key '${key}' has empty value.`);
28398
28407
  }
28399
28408
  seenKebab.add(key);
28400
28409
  seen[KEBAB_TO_CAMEL[key]] = value;
28401
28410
  }
28402
28411
  const missing = MAPPING_REQUIRED_KEYS.filter((k) => !seenKebab.has(k));
28403
28412
  if (missing.length) {
28404
- throw new Error(`--mapping is missing required keys: ${missing.join(", ")}. Got: '${raw}'.`);
28413
+ throw new InvalidArgumentError2(`--mapping is missing required keys: ${missing.join(", ")}. Got: '${raw}'.`);
28405
28414
  }
28406
28415
  return {
28407
28416
  llmName: seen.llmName,
@@ -29529,4 +29538,4 @@ export {
29529
29538
  metadata
29530
29539
  };
29531
29540
 
29532
- //# debugId=26C349BEBC0C07BC64756E2164756E21
29541
+ //# debugId=150AB4CB3204FB0764756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/llmgw-tool",
3
3
  "license": "MIT",
4
- "version": "1.198.0",
4
+ "version": "1.199.0-preview.105",
5
5
  "description": "CLI plugin for UiPath AI Trust Layer Bring-Your-Own LLM connections.",
6
6
  "private": false,
7
7
  "repository": {
@@ -23,5 +23,5 @@
23
23
  "files": [
24
24
  "dist"
25
25
  ],
26
- "gitHead": "1fadf03d7a8dd102742571dff569fdac11808afb"
26
+ "gitHead": "30a83200f41e8bb994929322e33176b4355f6707"
27
27
  }