@uipath/agent-tool 1.206.0-preview.303 → 1.207.0-preview.305
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/{agent-tool-OK5DK57D-bjevqt47.js → agent-tool-OK5DK57D-swanc7b5.js} +2 -2
- package/dist/{browser-strategy-gnftxwsf.js → browser-strategy-1nk8hgcf.js} +1 -1
- package/dist/{de-AI7ML6JM-km47f8k4.js → de-B6IFKV43-9sk50xx0.js} +164 -2
- package/dist/{en-LAVDF7IQ-xe939kq1.js → en-5JIPZTS5-q1x823gc.js} +4 -2
- package/dist/{es-SPNKTD5Y-vw5cbgv5.js → es-AQW6PFIU-q2mz247f.js} +164 -2
- package/dist/{es-MX-7KJZPEQN-1fq0a9jr.js → es-MX-KWITVBWE-w49gknha.js} +164 -2
- package/dist/executor-tool.js +42 -9
- package/dist/{fr-AXJGUT53-hdg3pmd4.js → fr-RNWK2TMC-dpyzj366.js} +164 -2
- package/dist/index-9vtvwe74.js +26 -0
- package/dist/{index-89cxyepj.js → index-je168ncz.js} +7 -5
- package/dist/{index-r7ff4pb0.js → index-knn2nm9e.js} +104 -60
- package/dist/{index-18dnd3nk.js → index-v88kds1m.js} +5 -5
- package/dist/{index-kvhrzcvf.js → index-yv2728h1.js} +3 -3
- package/dist/index.js +9 -9
- package/dist/{ja-C7GZV6YP-hvtbngr5.js → ja-DH4I3GEF-ywyhhppa.js} +164 -2
- package/dist/{ko-Q24HSSL4-5vn55pte.js → ko-R5BCWVO7-whzgmh6q.js} +164 -2
- package/dist/{memory-runtime-service-tt5y1af6.js → memory-runtime-service-zk17fk27.js} +57 -11
- package/dist/{node-strategy-fk02jqd8.js → node-strategy-ems5bj71.js} +2 -2
- package/dist/{packager-tool-9xrkfzn1.js → packager-tool-4px3x90r.js} +51 -9
- package/dist/{packager-tool-j4an6b3v.js → packager-tool-85qp13np.js} +786 -294
- package/dist/{packager-tool-0ajs8pnk.js → packager-tool-9thx6ae9.js} +30 -8
- package/dist/{packager-tool-1qg04b7q.js → packager-tool-bzcphfa8.js} +4 -2
- package/dist/{packager-tool-2dd1qswc.js → packager-tool-fjgtaen6.js} +144 -12
- package/dist/{packager-tool-4shqngrj.js → packager-tool-gpm2hwy5.js} +316 -261
- package/dist/{packager-tool-kawtadzm.js → packager-tool-hgmpt45k.js} +34 -34
- package/dist/{packager-tool-fc08rcbk.js → packager-tool-k7h03v9f.js} +5 -3
- package/dist/{packager-tool-9nh85680.js → packager-tool-m0wy5pqh.js} +4 -2
- package/dist/{packager-tool-3t6d1zdz.js → packager-tool-m63j60x7.js} +120 -13
- package/dist/{packager-tool-dy6gcgks.js → packager-tool-wqg51y3z.js} +328 -133
- package/dist/{packager-tool-ehaw8hwg.js → packager-tool-xmv0ajm4.js} +56 -15
- package/dist/{packager-tool-kphvt8vb.js → packager-tool-yz4vywz9.js} +52 -15
- package/dist/packager-tool.js +6 -6
- package/dist/{pt-BR-BIUJXIPU-2sqzhr8y.js → pt-BR-6TBBEDQS-y3f2vg5d.js} +164 -2
- package/dist/{pt-MHX6JGAX-xfgvdqwg.js → pt-ZSQC5RZ3-8kp3g1z5.js} +164 -2
- package/dist/{ro-3RKJNGJZ-xqj14e3d.js → ro-P33AQ6ZL-s92z1mgg.js} +164 -2
- package/dist/solution-auth-1tdetckr.js +11 -0
- package/dist/tool.js +9 -9
- package/dist/{tr-PQLUUHPC-qsb7btxn.js → tr-XD73CQAA-tb2nrpyp.js} +164 -2
- package/dist/{zh-CN-OHNTHZRI-b0hjkfqn.js → zh-CN-GWP3B2EM-c07fm17a.js} +164 -2
- package/dist/{zh-TW-E4D3Y6ZR-tn3bmzz5.js → zh-TW-2DLUOA7C-9khqnr4r.js} +164 -2
- package/package.json +2 -2
- package/dist/solution-auth-4zs3axft.js +0 -11
|
@@ -2,12 +2,16 @@ import {
|
|
|
2
2
|
parseJWT2,
|
|
3
3
|
getLoginStatusAsync2,
|
|
4
4
|
getAuthContext2
|
|
5
|
-
} from "./packager-tool-
|
|
5
|
+
} from "./packager-tool-4px3x90r.js";
|
|
6
6
|
import {
|
|
7
7
|
getFileSystem
|
|
8
|
-
} from "./packager-tool-
|
|
8
|
+
} from "./packager-tool-9thx6ae9.js";
|
|
9
9
|
import {
|
|
10
10
|
catchError,
|
|
11
|
+
RESULTS,
|
|
12
|
+
carriedErrorCode,
|
|
13
|
+
carriedRetry,
|
|
14
|
+
defaultRetryForErrorCode,
|
|
11
15
|
extractErrorDetails,
|
|
12
16
|
extractErrorMessage,
|
|
13
17
|
extractErrorMessageSync,
|
|
@@ -15,27 +19,32 @@ import {
|
|
|
15
19
|
ATTACHMENT_UPLOAD_INSTRUCTIONS,
|
|
16
20
|
redactTokens,
|
|
17
21
|
parseAuthChallenge,
|
|
18
|
-
RESULTS,
|
|
19
22
|
classifiedFailure,
|
|
20
23
|
authContextFailure,
|
|
21
24
|
summarizePlatformBody,
|
|
22
25
|
logger,
|
|
23
26
|
OutputFormatter,
|
|
27
|
+
configureProjectTelemetry,
|
|
28
|
+
setProjectTelemetryTarget,
|
|
29
|
+
createProjectCommandResolver,
|
|
24
30
|
processContext,
|
|
31
|
+
requireConfirmation,
|
|
25
32
|
parseBoundedInt,
|
|
33
|
+
reportFailure,
|
|
26
34
|
getSdkUserAgentToken,
|
|
27
35
|
addSdkUserAgentHeader,
|
|
28
36
|
installSdkUserAgentHeader
|
|
29
|
-
} from "./packager-tool-
|
|
37
|
+
} from "./packager-tool-wqg51y3z.js";
|
|
30
38
|
import {
|
|
31
39
|
JobAttachmentUploadError2
|
|
32
|
-
} from "./packager-tool-
|
|
40
|
+
} from "./packager-tool-fjgtaen6.js";
|
|
33
41
|
import {
|
|
34
42
|
StudioWebIncompatibleProjectError2,
|
|
43
|
+
StudioWebInvalidFileNameError2,
|
|
35
44
|
UipignoreExcludesProjectError2,
|
|
36
45
|
isSolutionUploadHttpError2,
|
|
37
46
|
buildSolutionUploadFailureOutput2
|
|
38
|
-
} from "./packager-tool-
|
|
47
|
+
} from "./packager-tool-xmv0ajm4.js";
|
|
39
48
|
import {
|
|
40
49
|
migrateLegacyToolGuardrailPolicies,
|
|
41
50
|
AgentProjectService,
|
|
@@ -46,8 +55,9 @@ import {
|
|
|
46
55
|
prepareAttachmentInputs,
|
|
47
56
|
AgentDebugAttachmentUploadError,
|
|
48
57
|
AgentDebugStartOutcomeUnknownError,
|
|
58
|
+
AgentDebugStartRejectedError,
|
|
49
59
|
AgentDebugService
|
|
50
|
-
} from "./packager-tool-
|
|
60
|
+
} from "./packager-tool-yz4vywz9.js";
|
|
51
61
|
import {
|
|
52
62
|
string,
|
|
53
63
|
uuid,
|
|
@@ -75,11 +85,11 @@ import {
|
|
|
75
85
|
} from "./packager-tool-bh92xy8d.js";
|
|
76
86
|
import {
|
|
77
87
|
en_default
|
|
78
|
-
} from "./packager-tool-
|
|
88
|
+
} from "./packager-tool-k7h03v9f.js";
|
|
79
89
|
import {
|
|
80
90
|
prepareProjectLocation2,
|
|
81
91
|
tryRegisterProjectInParentSolution2
|
|
82
|
-
} from "./packager-tool-
|
|
92
|
+
} from "./packager-tool-m63j60x7.js";
|
|
83
93
|
import {
|
|
84
94
|
__toESM,
|
|
85
95
|
__commonJS
|
|
@@ -7081,7 +7091,7 @@ var package_default = {
|
|
|
7081
7091
|
name: "@uipath/agent-tool",
|
|
7082
7092
|
author: "UiPath",
|
|
7083
7093
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
7084
|
-
version: "1.
|
|
7094
|
+
version: "1.207.0-preview.305",
|
|
7085
7095
|
description: "cli plugin for creating and managing UiPath low-code agents",
|
|
7086
7096
|
private: false,
|
|
7087
7097
|
repository: {
|
|
@@ -7125,7 +7135,7 @@ var package_default = {
|
|
|
7125
7135
|
"@uipath/auth": "workspace:*",
|
|
7126
7136
|
"@uipath/common": "workspace:*",
|
|
7127
7137
|
"@uipath/filesystem": "workspace:*",
|
|
7128
|
-
"@uipath/flow-schema": "0.
|
|
7138
|
+
"@uipath/flow-schema": "0.135.1",
|
|
7129
7139
|
"@uipath/integrationservice-sdk": "workspace:*",
|
|
7130
7140
|
"@uipath/llmgw-sdk": "workspace:*",
|
|
7131
7141
|
"@uipath/orchestrator-sdk": "workspace:*",
|
|
@@ -7186,7 +7196,7 @@ function parsePositiveNumber(value, flag) {
|
|
|
7186
7196
|
return parsed;
|
|
7187
7197
|
}
|
|
7188
7198
|
var registerDebugCommand = (program) => {
|
|
7189
|
-
program.command("debug").description("Debug a low-code agent by running it on Studio Web and streaming the result. Job-attachment inputs can be supplied from local files with --attachment field=path.").argument("<project-path>", "Path to the agent project directory (containing agent.json)").option("-i, --inputs <json>", `Input arguments as JSON string (e.g. '{"input":"hello"}'). For a job-attachment field pass an existing Orchestrator attachment reference {"ID": "<attachment-id>"} (Data.Attachments of a previous --attachment run lists the IDs), or use --attachment to upload a local file.`).option("--attachment <field=path>", 'Upload a local file into a job-attachment input field of agent.json (repeatable). Format: field=path, e.g. --attachment fileIn=./invoice.pdf. The field must be declared as {"$ref": "#/definitions/job-attachment"} in inputSchema. Uploaded attachment IDs are returned in Data.Attachments.', appendOption, []).option("--poll-interval <ms>", "Polling interval in milliseconds", "2000").option("--timeout <seconds>", "Maximum seconds to wait for the debug run to finish").option("--login-validity <minutes>", "Minimum minutes before token expiration", (v) => Number.parseInt(v, 10), 10).examples(AGENT_DEBUG_EXAMPLES).trackedAction(processContext, async (projectPath, options) => {
|
|
7199
|
+
program.command("debug").description("Debug a low-code agent by running it on Studio Web and streaming the result. The run starts as you in your personal workspace, so your user needs a personal robot on the tenant. Job-attachment inputs can be supplied from local files with --attachment field=path.").argument("<project-path>", "Path to the agent project directory (containing agent.json)").option("-i, --inputs <json>", `Input arguments as JSON string (e.g. '{"input":"hello"}'). For a job-attachment field pass an existing Orchestrator attachment reference {"ID": "<attachment-id>"} (Data.Attachments of a previous --attachment run lists the IDs), or use --attachment to upload a local file.`).option("--attachment <field=path>", 'Upload a local file into a job-attachment input field of agent.json (repeatable). Format: field=path, e.g. --attachment fileIn=./invoice.pdf. The field must be declared as {"$ref": "#/definitions/job-attachment"} in inputSchema. Uploaded attachment IDs are returned in Data.Attachments.', appendOption, []).option("--poll-interval <ms>", "Polling interval in milliseconds", "2000").option("--timeout <seconds>", "Maximum seconds to wait for the debug run to finish").option("--login-validity <minutes>", "Minimum minutes before token expiration", (v) => Number.parseInt(v, 10), 10).examples(AGENT_DEBUG_EXAMPLES).trackedAction(processContext, async (projectPath, options, command) => {
|
|
7190
7200
|
const [authError, authContext] = await catchError(getAuthContext2({
|
|
7191
7201
|
ensureTokenValidityMinutes: options.loginValidity,
|
|
7192
7202
|
requireOrganizationId: true,
|
|
@@ -7222,6 +7232,7 @@ var registerDebugCommand = (program) => {
|
|
|
7222
7232
|
attachments,
|
|
7223
7233
|
pollIntervalMs,
|
|
7224
7234
|
maxPolls,
|
|
7235
|
+
onAgentDirResolved: (agentDir) => setProjectTelemetryTarget(command, agentDir),
|
|
7225
7236
|
onState: (state) => OutputFormatter.log({
|
|
7226
7237
|
Message: `State: ${state}`
|
|
7227
7238
|
})
|
|
@@ -7274,6 +7285,16 @@ var registerDebugCommand = (program) => {
|
|
|
7274
7285
|
processContext.exit(1);
|
|
7275
7286
|
return;
|
|
7276
7287
|
}
|
|
7288
|
+
if (error instanceof StudioWebInvalidFileNameError2) {
|
|
7289
|
+
OutputFormatter.error({
|
|
7290
|
+
Result: RESULTS.Failure,
|
|
7291
|
+
ErrorCode: "invalid_argument",
|
|
7292
|
+
Message: error.message,
|
|
7293
|
+
Instructions: 'Rename the listed file(s) so their names hold no control character and none of : * ? " < > |, or leave them out of the debug bundle with a .uipignore pattern, then debug again. Nothing was uploaded.'
|
|
7294
|
+
});
|
|
7295
|
+
processContext.exit(1);
|
|
7296
|
+
return;
|
|
7297
|
+
}
|
|
7277
7298
|
if (isSolutionUploadHttpError2(error)) {
|
|
7278
7299
|
OutputFormatter.error(buildSolutionUploadFailureOutput2(error, {
|
|
7279
7300
|
subject: "agent",
|
|
@@ -7282,6 +7303,18 @@ var registerDebugCommand = (program) => {
|
|
|
7282
7303
|
processContext.exit(1);
|
|
7283
7304
|
return;
|
|
7284
7305
|
}
|
|
7306
|
+
if (error instanceof AgentDebugStartRejectedError) {
|
|
7307
|
+
OutputFormatter.error({
|
|
7308
|
+
Result: error.result,
|
|
7309
|
+
ErrorCode: error.errorCode,
|
|
7310
|
+
Message: error.message,
|
|
7311
|
+
Instructions: error.instructions,
|
|
7312
|
+
Retry: error.retry,
|
|
7313
|
+
...error.context ? { Context: error.context } : {}
|
|
7314
|
+
});
|
|
7315
|
+
processContext.exit(1);
|
|
7316
|
+
return;
|
|
7317
|
+
}
|
|
7285
7318
|
if (error instanceof AgentDebugStartOutcomeUnknownError) {
|
|
7286
7319
|
const data = {};
|
|
7287
7320
|
if (error.bound.length > 0) {
|
|
@@ -7610,7 +7643,7 @@ var package_default2 = {
|
|
|
7610
7643
|
name: "@uipath/agent-sdk",
|
|
7611
7644
|
author: "UiPath",
|
|
7612
7645
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
7613
|
-
version: "1.
|
|
7646
|
+
version: "1.207.0-preview.305",
|
|
7614
7647
|
description: "SDK for the UiPath Agent Runtime API — evaluation execution and debug sessions.",
|
|
7615
7648
|
repository: {
|
|
7616
7649
|
type: "git",
|
|
@@ -9282,7 +9315,7 @@ async function refusalBody(response) {
|
|
|
9282
9315
|
return summarizePlatformBody(redactTokens(body));
|
|
9283
9316
|
}
|
|
9284
9317
|
async function sessionIdentity() {
|
|
9285
|
-
const { getAuthContext } = await import("./index-
|
|
9318
|
+
const { getAuthContext } = await import("./index-yv2728h1.js");
|
|
9286
9319
|
const [, ctx] = await catchError(getAuthContext());
|
|
9287
9320
|
return ctx?.identity;
|
|
9288
9321
|
}
|
|
@@ -9697,22 +9730,6 @@ var registerEvalRunCommands = (evalCmd) => {
|
|
|
9697
9730
|
}
|
|
9698
9731
|
})());
|
|
9699
9732
|
if (error) {
|
|
9700
|
-
const {
|
|
9701
|
-
buildSolutionUploadFailureOutput,
|
|
9702
|
-
isSolutionUploadHttpError
|
|
9703
|
-
} = await import("./index-89cxyepj.js");
|
|
9704
|
-
if (isSolutionUploadHttpError(error)) {
|
|
9705
|
-
const failure = buildSolutionUploadFailureOutput(error, {
|
|
9706
|
-
subject: "agent",
|
|
9707
|
-
importCheckHint: "Run 'uip agent validate' to confirm the project is well-formed."
|
|
9708
|
-
});
|
|
9709
|
-
OutputFormatter.error({
|
|
9710
|
-
...failure,
|
|
9711
|
-
Message: "Failed to start evaluation run",
|
|
9712
|
-
Instructions: `${failure.Message}. ${failure.Instructions}`
|
|
9713
|
-
});
|
|
9714
|
-
return;
|
|
9715
|
-
}
|
|
9716
9733
|
OutputFormatter.error(await evalRuntimeFailure("Failed to start evaluation run", error));
|
|
9717
9734
|
processContext.exit(1);
|
|
9718
9735
|
}
|
|
@@ -10442,11 +10459,10 @@ function buildUrl(baseUrl, path, query) {
|
|
|
10442
10459
|
const qs = search.toString();
|
|
10443
10460
|
return qs ? `${trimmed}${suffix}?${qs}` : `${trimmed}${suffix}`;
|
|
10444
10461
|
}
|
|
10445
|
-
async function
|
|
10462
|
+
async function httpError(response) {
|
|
10446
10463
|
const text = await response.text().catch(() => "");
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
return `${response.status} ${response.statusText}: ${text.slice(0, 1000)}`;
|
|
10464
|
+
const reason = response.statusText || "Request failed";
|
|
10465
|
+
return Object.assign(new Error(text ? `${reason}: ${text.slice(0, 1000)}` : reason), { status: response.status });
|
|
10450
10466
|
}
|
|
10451
10467
|
async function createAiHttpContext(service, options) {
|
|
10452
10468
|
const { auth, bearerToken } = await resolveAuth(options);
|
|
@@ -10484,10 +10500,11 @@ async function createAiHttpContext(service, options) {
|
|
|
10484
10500
|
const response = await fetch(url, {
|
|
10485
10501
|
method: req.method,
|
|
10486
10502
|
headers,
|
|
10487
|
-
body: req.body !== undefined ? JSON.stringify(req.body) : undefined
|
|
10503
|
+
body: req.body !== undefined ? JSON.stringify(req.body) : undefined,
|
|
10504
|
+
signal: options?.signal
|
|
10488
10505
|
});
|
|
10489
10506
|
if (!response.ok) {
|
|
10490
|
-
throw
|
|
10507
|
+
throw await httpError(response);
|
|
10491
10508
|
}
|
|
10492
10509
|
if (response.status === 204) {
|
|
10493
10510
|
return;
|
|
@@ -10509,10 +10526,11 @@ async function createAiHttpContext(service, options) {
|
|
|
10509
10526
|
const response = await fetch(url, {
|
|
10510
10527
|
method: req.method,
|
|
10511
10528
|
headers,
|
|
10512
|
-
body: req.body !== undefined ? JSON.stringify(req.body) : undefined
|
|
10529
|
+
body: req.body !== undefined ? JSON.stringify(req.body) : undefined,
|
|
10530
|
+
signal: options?.signal
|
|
10513
10531
|
});
|
|
10514
10532
|
if (!response.ok) {
|
|
10515
|
-
throw
|
|
10533
|
+
throw await httpError(response);
|
|
10516
10534
|
}
|
|
10517
10535
|
};
|
|
10518
10536
|
return {
|
|
@@ -10844,7 +10862,7 @@ var registerGuardrailCommands = (program) => {
|
|
|
10844
10862
|
|
|
10845
10863
|
// src/services/project-artifacts.ts
|
|
10846
10864
|
async function ensureProjectArtifacts(args) {
|
|
10847
|
-
const { addProjectArtifactsToSolutionAsync } = await import("./index-
|
|
10865
|
+
const { addProjectArtifactsToSolutionAsync } = await import("./index-knn2nm9e.js");
|
|
10848
10866
|
return addProjectArtifactsToSolutionAsync(args);
|
|
10849
10867
|
}
|
|
10850
10868
|
|
|
@@ -11184,8 +11202,8 @@ var INIT_EXAMPLES = [
|
|
|
11184
11202
|
];
|
|
11185
11203
|
var registerInitCommand = (program) => {
|
|
11186
11204
|
program.command("init").description("Scaffold a new agent project at the given path. " + "When run inside a solution directory, the project is auto-registered in the " + "surrounding solution's .uipx. When run outside any solution, a parent " + "'<name>Solution' is scaffolded automatically and the agent project is nested " + `inside it (pass --skip-solution-registration to opt out of both behaviors).
|
|
11187
|
-
` + "With --inline-in-flow, scaffolds an inline agent inside a flow project instead " + "(UUID-named subdirectory, no entry-points/project.uiproj, empty flow-layout.json).").argument("<path>", "Target directory for the agent project (relative or absolute). " + "When --inline-in-flow is used, this is the flow project directory.").option("--conversational", "Scaffold a conversational agent. When not provided, defaults to an autonomous agent.").option("--model <model>", "LLM model to use. When not provided, uses recommended default for " + "autonomous/conversational agent.").option("--system-prompt <prompt>", "Initial system prompt for the agent").option("--force", "Overwrite existing directory if non-empty").option("--skip-solution-registration", "Do not auto-register this project in the surrounding solution").option("--inline-in-flow", "Scaffold an inline agent inside a flow project. " + "The <path> argument becomes the flow project directory. " + "Creates a UUID-named subdirectory with agent.json, empty flow-layout.json, " + "and empty evals/features/resources folders.").examples(INIT_EXAMPLES).trackedAction(processContext, async (targetPath, options) => {
|
|
11188
|
-
const [error] = await catchError(options.inlineInFlow === true ? scaffoldInlineAgent(targetPath, options) : scaffoldStandaloneAgent(targetPath, options));
|
|
11205
|
+
` + "With --inline-in-flow, scaffolds an inline agent inside a flow project instead " + "(UUID-named subdirectory, no entry-points/project.uiproj, empty flow-layout.json).").argument("<path>", "Target directory for the agent project (relative or absolute). " + "When --inline-in-flow is used, this is the flow project directory.").option("--conversational", "Scaffold a conversational agent. When not provided, defaults to an autonomous agent.").option("--model <model>", "LLM model to use. When not provided, uses recommended default for " + "autonomous/conversational agent.").option("--system-prompt <prompt>", "Initial system prompt for the agent").option("--force", "Overwrite existing directory if non-empty").option("--skip-solution-registration", "Do not auto-register this project in the surrounding solution").option("--inline-in-flow", "Scaffold an inline agent inside a flow project. " + "The <path> argument becomes the flow project directory. " + "Creates a UUID-named subdirectory with agent.json, empty flow-layout.json, " + "and empty evals/features/resources folders.").examples(INIT_EXAMPLES).trackedAction(processContext, async (targetPath, options, command) => {
|
|
11206
|
+
const [error, created] = await catchError(options.inlineInFlow === true ? scaffoldInlineAgent(targetPath, options) : scaffoldStandaloneAgent(targetPath, options));
|
|
11189
11207
|
if (error) {
|
|
11190
11208
|
OutputFormatter.error({
|
|
11191
11209
|
Result: RESULTS.Failure,
|
|
@@ -11193,7 +11211,9 @@ var registerInitCommand = (program) => {
|
|
|
11193
11211
|
Instructions: error.message
|
|
11194
11212
|
});
|
|
11195
11213
|
processContext.exit(1);
|
|
11214
|
+
return;
|
|
11196
11215
|
}
|
|
11216
|
+
await setProjectTelemetryTarget(command, created);
|
|
11197
11217
|
});
|
|
11198
11218
|
};
|
|
11199
11219
|
async function scaffoldStandaloneAgent(targetPath, options) {
|
|
@@ -11277,6 +11297,7 @@ async function scaffoldStandaloneAgent(targetPath, options) {
|
|
|
11277
11297
|
Code: "AgentInit",
|
|
11278
11298
|
Data: data
|
|
11279
11299
|
});
|
|
11300
|
+
return projectDir;
|
|
11280
11301
|
}
|
|
11281
11302
|
function buildStandaloneNextSteps(projectPath, solutionRegistration) {
|
|
11282
11303
|
const steps = ["# Edit agent.json to configure prompts and resources"];
|
|
@@ -11336,6 +11357,7 @@ async function scaffoldInlineAgent(targetPath, options) {
|
|
|
11336
11357
|
`)
|
|
11337
11358
|
}
|
|
11338
11359
|
});
|
|
11360
|
+
return agentDir;
|
|
11339
11361
|
}
|
|
11340
11362
|
|
|
11341
11363
|
// src/services/solution-folder.ts
|
|
@@ -11344,7 +11366,7 @@ var SOLUTION_FOLDER = "solution_folder";
|
|
|
11344
11366
|
// src/services/memory-space-solution-link.ts
|
|
11345
11367
|
async function findEnclosingSolutionFile(projectPath) {
|
|
11346
11368
|
const fs = getFileSystem();
|
|
11347
|
-
const { findSolutionFileUpward } = await import("./index-
|
|
11369
|
+
const { findSolutionFileUpward } = await import("./index-je168ncz.js");
|
|
11348
11370
|
const [error, solutionFile] = await catchError(findSolutionFileUpward(fs, fs.path.resolve(projectPath)));
|
|
11349
11371
|
if (error) {
|
|
11350
11372
|
if (error.message.startsWith("No .uipx solution file found")) {
|
|
@@ -11394,7 +11416,7 @@ async function activeTenantId() {
|
|
|
11394
11416
|
return status.tenantId ?? undefined;
|
|
11395
11417
|
}
|
|
11396
11418
|
async function openSolution(solutionDir) {
|
|
11397
|
-
const engine = await import("./index-
|
|
11419
|
+
const engine = await import("./index-knn2nm9e.js");
|
|
11398
11420
|
const services = await engine.createResourceBuilderServices();
|
|
11399
11421
|
await engine.normalizeResourceFileCasing(solutionDir);
|
|
11400
11422
|
const builder = await services.getSolutionBuilder(solutionDir);
|
|
@@ -11816,6 +11838,58 @@ var MEMORY_ITEM_LIST_EXAMPLES = [
|
|
|
11816
11838
|
}
|
|
11817
11839
|
}
|
|
11818
11840
|
];
|
|
11841
|
+
var SAMPLE_ITEM_TARGET = {
|
|
11842
|
+
Memory: "SupportRecall",
|
|
11843
|
+
MemorySpace: "customer-support-recall",
|
|
11844
|
+
MemorySpaceId: "a1b2c3d4-0000-0000-0000-000000000090",
|
|
11845
|
+
FolderPath: "Shared/MySolution",
|
|
11846
|
+
FolderKey: "5c1eab29-0000-0000-0000-000000000030"
|
|
11847
|
+
};
|
|
11848
|
+
var MEMORY_ITEM_REMOVE_EXAMPLES = [
|
|
11849
|
+
{
|
|
11850
|
+
Description: "Take a bad import back out: remove the item promoted from a feedback",
|
|
11851
|
+
Command: "uip agent memory item remove SupportRecall --feedback-id 2f1e0c3a-0000-0000-0000-000000000010 --folder-path Shared/MySolution --path ./my-agent --yes",
|
|
11852
|
+
Output: {
|
|
11853
|
+
Code: "AgentMemoryItemRemove",
|
|
11854
|
+
Data: {
|
|
11855
|
+
Status: "Memory items removed",
|
|
11856
|
+
...SAMPLE_ITEM_TARGET,
|
|
11857
|
+
Items: [
|
|
11858
|
+
{
|
|
11859
|
+
Id: "a1b2c3d4-0000-0000-0000-000000000080",
|
|
11860
|
+
FeedbackId: "2f1e0c3a-0000-0000-0000-000000000010",
|
|
11861
|
+
MemoryType: 0,
|
|
11862
|
+
Status: 0
|
|
11863
|
+
}
|
|
11864
|
+
]
|
|
11865
|
+
}
|
|
11866
|
+
}
|
|
11867
|
+
}
|
|
11868
|
+
];
|
|
11869
|
+
function itemStatusExamples(verb, status) {
|
|
11870
|
+
const done = verb === "disable" ? "disabled" : "enabled";
|
|
11871
|
+
return [
|
|
11872
|
+
{
|
|
11873
|
+
Description: verb === "disable" ? "Stop the agent retrieving an item without deleting it" : "Let the agent retrieve a disabled item again",
|
|
11874
|
+
Command: `uip agent memory item ${verb} SupportRecall --item-id a1b2c3d4-0000-0000-0000-000000000080 --folder-path Shared/MySolution --path ./my-agent`,
|
|
11875
|
+
Output: {
|
|
11876
|
+
Code: verb === "disable" ? "AgentMemoryItemDisable" : "AgentMemoryItemEnable",
|
|
11877
|
+
Data: {
|
|
11878
|
+
Status: `Memory items ${done}`,
|
|
11879
|
+
...SAMPLE_ITEM_TARGET,
|
|
11880
|
+
Items: [
|
|
11881
|
+
{
|
|
11882
|
+
Id: "a1b2c3d4-0000-0000-0000-000000000080",
|
|
11883
|
+
FeedbackId: "2f1e0c3a-0000-0000-0000-000000000010",
|
|
11884
|
+
MemoryType: 0,
|
|
11885
|
+
Status: status
|
|
11886
|
+
}
|
|
11887
|
+
]
|
|
11888
|
+
}
|
|
11889
|
+
}
|
|
11890
|
+
}
|
|
11891
|
+
];
|
|
11892
|
+
}
|
|
11819
11893
|
var SOLUTION_LINK_UNAVAILABLE = {
|
|
11820
11894
|
Status: "Unavailable",
|
|
11821
11895
|
Instructions: "Declaring the memory space in the solution is not available in this build. Pass --reference-key with the solution resource key, and --folder-path."
|
|
@@ -11904,7 +11978,7 @@ async function resolveRuntimeTarget(memoryName, options) {
|
|
|
11904
11978
|
if (options.folderKey === undefined && folderPath.toLowerCase() === SOLUTION_FOLDER) {
|
|
11905
11979
|
throw new Error(`Feature "${feature.name}" points at ${SOLUTION_FOLDER}, the placeholder the deploy replaces with the deployment folder. Pass --folder-path <deployed folder path> or --folder-key <key> for the folder the solution is deployed to ('uip solution deploy list' shows it).`);
|
|
11906
11980
|
}
|
|
11907
|
-
const { findRuntimeMemorySpace, resolveRuntimeFolder } = await import("./memory-runtime-service-
|
|
11981
|
+
const { findRuntimeMemorySpace, resolveRuntimeFolder } = await import("./memory-runtime-service-zk17fk27.js");
|
|
11908
11982
|
const folder = await resolveRuntimeFolder(options.folderKey !== undefined ? { folderKey: options.folderKey } : { folderPath });
|
|
11909
11983
|
if (folder === undefined) {
|
|
11910
11984
|
throw new Error("Memory items are not available in this build; use the uip CLI.");
|
|
@@ -11912,6 +11986,136 @@ async function resolveRuntimeTarget(memoryName, options) {
|
|
|
11912
11986
|
const space = await findRuntimeMemorySpace(feature.memorySpaceName, folder.key);
|
|
11913
11987
|
return { feature, folder, space };
|
|
11914
11988
|
}
|
|
11989
|
+
function cliError(message, errorCode) {
|
|
11990
|
+
return Object.assign(new Error(message), { errorCode });
|
|
11991
|
+
}
|
|
11992
|
+
function checkItemSelector(options) {
|
|
11993
|
+
if (options.itemId !== undefined && options.feedbackId !== undefined) {
|
|
11994
|
+
throw cliError("Pass either --item-id or --feedback-id, not both.", "invalid_argument");
|
|
11995
|
+
}
|
|
11996
|
+
if (options.itemId === undefined && options.feedbackId === undefined) {
|
|
11997
|
+
throw cliError("Name the items: pass --item-id <ids...> (the Id from 'uip agent memory item list') or --feedback-id <ids...> (the feedback the items were promoted from).", "invalid_argument");
|
|
11998
|
+
}
|
|
11999
|
+
const flag = options.itemId !== undefined ? "--item-id" : "--feedback-id";
|
|
12000
|
+
const ids = options.itemId ?? options.feedbackId ?? [];
|
|
12001
|
+
if (ids.some((id) => id.trim() === "")) {
|
|
12002
|
+
throw cliError(`${flag} got an empty value; nothing was changed. Pass the ids themselves (an unset shell variable expands to an empty string).`, "invalid_argument");
|
|
12003
|
+
}
|
|
12004
|
+
}
|
|
12005
|
+
function selectItems(items, options) {
|
|
12006
|
+
const byItemId = options.itemId !== undefined;
|
|
12007
|
+
const keyOf = (item) => {
|
|
12008
|
+
const key = byItemId ? item.memoryItemId : item.feedbackId;
|
|
12009
|
+
return key ? key.toLowerCase() : undefined;
|
|
12010
|
+
};
|
|
12011
|
+
const wanted = [
|
|
12012
|
+
...new Set((options.itemId ?? options.feedbackId ?? []).map((id) => id.toLowerCase()))
|
|
12013
|
+
];
|
|
12014
|
+
const selected = items.filter((item) => {
|
|
12015
|
+
const key = keyOf(item);
|
|
12016
|
+
return key !== undefined && wanted.includes(key);
|
|
12017
|
+
});
|
|
12018
|
+
const missing = wanted.filter((id) => !selected.some((item) => keyOf(item) === id));
|
|
12019
|
+
if (missing.length > 0) {
|
|
12020
|
+
throw cliError(`The memory space holds no item with ${byItemId ? "id" : "feedback id"} ${missing.join(", ")}; nothing was changed. Run 'uip agent memory item list <name>' with the same --folder-path or --folder-key to see the items it holds.`, "not_found");
|
|
12021
|
+
}
|
|
12022
|
+
return selected;
|
|
12023
|
+
}
|
|
12024
|
+
async function resolveItems(memoryName, options) {
|
|
12025
|
+
checkItemSelector(options);
|
|
12026
|
+
const target = await resolveRuntimeTarget(memoryName, options);
|
|
12027
|
+
const { listRuntimeMemoryItems } = await import("./memory-runtime-service-zk17fk27.js");
|
|
12028
|
+
const all = await listRuntimeMemoryItems(target.space.id, target.folder.key);
|
|
12029
|
+
return { target, items: selectItems(all, options) };
|
|
12030
|
+
}
|
|
12031
|
+
function targetData(target) {
|
|
12032
|
+
return {
|
|
12033
|
+
Memory: target.feature.name,
|
|
12034
|
+
MemorySpace: target.space.name,
|
|
12035
|
+
MemorySpaceId: target.space.id,
|
|
12036
|
+
FolderPath: target.folder.path,
|
|
12037
|
+
FolderKey: target.folder.key
|
|
12038
|
+
};
|
|
12039
|
+
}
|
|
12040
|
+
function itemRow(item) {
|
|
12041
|
+
return {
|
|
12042
|
+
Id: item.memoryItemId,
|
|
12043
|
+
FeedbackId: item.feedbackId ?? null,
|
|
12044
|
+
MemoryType: item.memoryType ?? null,
|
|
12045
|
+
Status: item.status ?? null
|
|
12046
|
+
};
|
|
12047
|
+
}
|
|
12048
|
+
function withProgress(error, doneIds, total, done) {
|
|
12049
|
+
if (doneIds.length > 0) {
|
|
12050
|
+
error.message = `${error.message} ${doneIds.length} of ${total} items were ${done} before the failure: ${doneIds.join(", ")}.`;
|
|
12051
|
+
}
|
|
12052
|
+
return error;
|
|
12053
|
+
}
|
|
12054
|
+
async function removeItems(memoryName, options) {
|
|
12055
|
+
const { target, items } = await resolveItems(memoryName, options);
|
|
12056
|
+
const { deleteRuntimeMemoryItems } = await import("./memory-runtime-service-zk17fk27.js");
|
|
12057
|
+
const ids = items.map((item) => item.memoryItemId);
|
|
12058
|
+
const [error] = await catchError(deleteRuntimeMemoryItems(target.space.id, target.folder.key, ids));
|
|
12059
|
+
if (error) {
|
|
12060
|
+
const deletedIds = error.deletedIds ?? [];
|
|
12061
|
+
throw withProgress(error, deletedIds, ids.length, "removed");
|
|
12062
|
+
}
|
|
12063
|
+
return {
|
|
12064
|
+
Status: "Memory items removed",
|
|
12065
|
+
...targetData(target),
|
|
12066
|
+
Items: items.map(itemRow)
|
|
12067
|
+
};
|
|
12068
|
+
}
|
|
12069
|
+
async function setItemsStatus(memoryName, options, status, done) {
|
|
12070
|
+
const { target, items } = await resolveItems(memoryName, options);
|
|
12071
|
+
const { setRuntimeMemoryItemStatus } = await import("./memory-runtime-service-zk17fk27.js");
|
|
12072
|
+
const changed = [];
|
|
12073
|
+
for (const item of items) {
|
|
12074
|
+
const [error, updated] = await catchError(setRuntimeMemoryItemStatus(target.space.id, target.folder.key, item.memoryItemId, status));
|
|
12075
|
+
if (error) {
|
|
12076
|
+
throw withProgress(error, changed.map((c) => c.memoryItemId), items.length, done);
|
|
12077
|
+
}
|
|
12078
|
+
changed.push(updated ?? { ...item, status });
|
|
12079
|
+
}
|
|
12080
|
+
return {
|
|
12081
|
+
Status: `Memory items ${done}`,
|
|
12082
|
+
...targetData(target),
|
|
12083
|
+
Items: changed.map(itemRow)
|
|
12084
|
+
};
|
|
12085
|
+
}
|
|
12086
|
+
function itemCommandOptions(command) {
|
|
12087
|
+
return command.argument("<name>", "Feature name, memory space name, or ID").option("--item-id <ids...>", "Items to act on, by the Id 'item list' shows. Space-separated").option("--feedback-id <ids...>", "Items to act on, by the feedback they were promoted from, instead of --item-id. Space-separated").option("--folder-path <path>", "Orchestrator folder the memory space lives in at runtime. Defaults to the feature's folder; required when that is solution_folder").option("--folder-key <key>", "Orchestrator folder key, instead of --folder-path").option("--path <path>", "Path to agent project directory", ".");
|
|
12088
|
+
}
|
|
12089
|
+
function registerItemStatusCommand(memoryItem, verb, status, description) {
|
|
12090
|
+
const done = verb === "disable" ? "disabled" : "enabled";
|
|
12091
|
+
const code = verb === "disable" ? "AgentMemoryItemDisable" : "AgentMemoryItemEnable";
|
|
12092
|
+
itemCommandOptions(memoryItem.command(verb).description(description)).examples(itemStatusExamples(verb, status)).trackedAction(processContext, async (memoryName, options) => {
|
|
12093
|
+
const [error, data] = await catchError(setItemsStatus(memoryName, options, status, done));
|
|
12094
|
+
if (error) {
|
|
12095
|
+
await reportFailure(`Failed to ${verb} memory items`, error);
|
|
12096
|
+
return;
|
|
12097
|
+
}
|
|
12098
|
+
OutputFormatter.success({
|
|
12099
|
+
Result: RESULTS.Success,
|
|
12100
|
+
Code: code,
|
|
12101
|
+
Data: data
|
|
12102
|
+
});
|
|
12103
|
+
});
|
|
12104
|
+
}
|
|
12105
|
+
async function explainAddFailure(error, request, target) {
|
|
12106
|
+
if (request.memoryType !== 0 || request.feedbackId.trim() === "" || carriedErrorCode(error) !== "server_error") {
|
|
12107
|
+
return error;
|
|
12108
|
+
}
|
|
12109
|
+
const { listRuntimeMemoryItems } = await import("./memory-runtime-service-zk17fk27.js");
|
|
12110
|
+
const [listError, items] = await catchError(listRuntimeMemoryItems(target.space.id, target.folder.key, 0));
|
|
12111
|
+
if (listError)
|
|
12112
|
+
return error;
|
|
12113
|
+
const feedbackId = request.feedbackId.toLowerCase();
|
|
12114
|
+
const existing = items.find((item) => item.feedbackId?.toLowerCase() === feedbackId);
|
|
12115
|
+
if (!existing)
|
|
12116
|
+
return error;
|
|
12117
|
+
return cliError(`Feedback ${request.feedbackId} is already in the memory space as item ${existing.memoryItemId}; nothing was added. A feedback is promoted once: to promote it again, remove the item first with 'uip agent memory item remove <name> --feedback-id <feedback-id> --yes'.`, "invalid_argument");
|
|
12118
|
+
}
|
|
11915
12119
|
var registerMemoryCommands = (program) => {
|
|
11916
12120
|
const memory = program.command("memory").description("Manage agent memory space features");
|
|
11917
12121
|
memory.command("add").description("Attach a memory space to the agent").argument("<name>", "Feature name to use in the agent").requiredOption("--memory-space <name>", "Memory space name to attach").option("--folder-path <path>", "Folder path where the memory space exists. Defaults to solution_folder when the project is inside a solution").option("--reference-key <key>", "Memory space solution resource key. Resolved from the enclosing solution when omitted").option("--description <desc>", "Memory space description").option("--threshold <n>", "Retrieval score threshold", "0").option("--result-count <n>", "Number of results to retrieve", "3").option("--search-mode <mode>", "Search mode (hybrid, semantic)", "hybrid").option("--field <name=weight>", "Input field weight. Repeat for multiple fields", collectOption, []).option("--disable-dynamic-few-shot", "Attach the memory space without enabling dynamic few-shot retrieval").option("--path <path>", "Path to agent project directory", ".").examples(MEMORY_ADD_EXAMPLES).trackedAction(processContext, async (name, options) => {
|
|
@@ -12045,8 +12249,11 @@ var registerMemoryCommands = (program) => {
|
|
|
12045
12249
|
const memoryType = parseMemoryType(options.memoryType);
|
|
12046
12250
|
const request = buildItemRequest(memoryType, options);
|
|
12047
12251
|
const target = await resolveRuntimeTarget(memoryName, options);
|
|
12048
|
-
const { addRuntimeMemoryItem } = await import("./memory-runtime-service-
|
|
12049
|
-
const item = await addRuntimeMemoryItem(target.space.id, target.folder.key, request);
|
|
12252
|
+
const { addRuntimeMemoryItem } = await import("./memory-runtime-service-zk17fk27.js");
|
|
12253
|
+
const [addError, item] = await catchError(addRuntimeMemoryItem(target.space.id, target.folder.key, request));
|
|
12254
|
+
if (addError) {
|
|
12255
|
+
throw await explainAddFailure(addError, request, target);
|
|
12256
|
+
}
|
|
12050
12257
|
OutputFormatter.success({
|
|
12051
12258
|
Result: RESULTS.Success,
|
|
12052
12259
|
Code: "AgentMemoryItemAdd",
|
|
@@ -12066,10 +12273,13 @@ var registerMemoryCommands = (program) => {
|
|
|
12066
12273
|
});
|
|
12067
12274
|
})());
|
|
12068
12275
|
if (error) {
|
|
12276
|
+
const errorCode = carriedErrorCode(error) ?? "unknown_error";
|
|
12069
12277
|
OutputFormatter.error({
|
|
12070
12278
|
Result: RESULTS.Failure,
|
|
12279
|
+
ErrorCode: errorCode,
|
|
12071
12280
|
Message: "Failed to add memory item",
|
|
12072
|
-
Instructions: error.message
|
|
12281
|
+
Instructions: error.message,
|
|
12282
|
+
Retry: carriedRetry(error) ?? defaultRetryForErrorCode(errorCode)
|
|
12073
12283
|
});
|
|
12074
12284
|
processContext.exit(1);
|
|
12075
12285
|
}
|
|
@@ -12078,7 +12288,7 @@ var registerMemoryCommands = (program) => {
|
|
|
12078
12288
|
const [error] = await catchError((async () => {
|
|
12079
12289
|
const memoryType = options.memoryType === undefined ? undefined : parseMemoryType(options.memoryType);
|
|
12080
12290
|
const target = await resolveRuntimeTarget(memoryName, options);
|
|
12081
|
-
const { listRuntimeMemoryItems } = await import("./memory-runtime-service-
|
|
12291
|
+
const { listRuntimeMemoryItems } = await import("./memory-runtime-service-zk17fk27.js");
|
|
12082
12292
|
const items = await listRuntimeMemoryItems(target.space.id, target.folder.key, memoryType);
|
|
12083
12293
|
OutputFormatter.success({
|
|
12084
12294
|
Result: RESULTS.Success,
|
|
@@ -12105,6 +12315,28 @@ var registerMemoryCommands = (program) => {
|
|
|
12105
12315
|
processContext.exit(1);
|
|
12106
12316
|
}
|
|
12107
12317
|
});
|
|
12318
|
+
itemCommandOptions(memoryItem.command("remove").description("Delete items from the memory space for good. Pick them by --item-id or by the --feedback-id they were promoted from; every id is checked against the space before anything is deleted")).option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(MEMORY_ITEM_REMOVE_EXAMPLES).trackedAction(processContext, async (memoryName, options) => {
|
|
12319
|
+
const [inputError] = catchError(() => checkItemSelector(options));
|
|
12320
|
+
if (inputError) {
|
|
12321
|
+
await reportFailure("Failed to remove memory items", inputError);
|
|
12322
|
+
return;
|
|
12323
|
+
}
|
|
12324
|
+
if (!requireConfirmation(options, `delete the selected items from memory "${memoryName}"`)) {
|
|
12325
|
+
return;
|
|
12326
|
+
}
|
|
12327
|
+
const [error, data] = await catchError(removeItems(memoryName, options));
|
|
12328
|
+
if (error) {
|
|
12329
|
+
await reportFailure("Failed to remove memory items", error);
|
|
12330
|
+
return;
|
|
12331
|
+
}
|
|
12332
|
+
OutputFormatter.success({
|
|
12333
|
+
Result: RESULTS.Success,
|
|
12334
|
+
Code: "AgentMemoryItemRemove",
|
|
12335
|
+
Data: data
|
|
12336
|
+
});
|
|
12337
|
+
});
|
|
12338
|
+
registerItemStatusCommand(memoryItem, "disable", 1, "Stop the agent retrieving items without deleting them. Pick them by --item-id or by the --feedback-id they were promoted from");
|
|
12339
|
+
registerItemStatusCommand(memoryItem, "enable", 0, "Let the agent retrieve disabled items again. Pick them by --item-id or by the --feedback-id they were promoted from");
|
|
12108
12340
|
};
|
|
12109
12341
|
|
|
12110
12342
|
// src/commands/model-manage.ts
|
|
@@ -12181,7 +12413,7 @@ var __glob = (map) => (path) => {
|
|
|
12181
12413
|
throw new Error("Module not found in bundle: " + path);
|
|
12182
12414
|
};
|
|
12183
12415
|
|
|
12184
|
-
// ../../node_modules/@uipath/flow-schema/dist/chunk-
|
|
12416
|
+
// ../../node_modules/@uipath/flow-schema/dist/chunk-B7OZS767.js
|
|
12185
12417
|
var SUPPORTED_LOCALES = ["en", "es", "pt", "de", "fr", "ja", "ko", "ru", "tr", "ro", "zh-CN", "zh-TW", "pt-BR", "es-MX"];
|
|
12186
12418
|
function normalizeCasing(locale) {
|
|
12187
12419
|
const [language, country] = locale.split("-");
|
|
@@ -12232,20 +12464,20 @@ function createI18nRegistrar(options) {
|
|
|
12232
12464
|
};
|
|
12233
12465
|
}
|
|
12234
12466
|
var globImport_locales_json = __glob({
|
|
12235
|
-
"../../locales/de.json": () => import("./de-
|
|
12236
|
-
"../../locales/en.json": () => import("./en-
|
|
12237
|
-
"../../locales/es-MX.json": () => import("./es-MX-
|
|
12238
|
-
"../../locales/es.json": () => import("./es-
|
|
12239
|
-
"../../locales/fr.json": () => import("./fr-
|
|
12240
|
-
"../../locales/ja.json": () => import("./ja-
|
|
12241
|
-
"../../locales/ko.json": () => import("./ko-
|
|
12242
|
-
"../../locales/pt-BR.json": () => import("./pt-BR-
|
|
12243
|
-
"../../locales/pt.json": () => import("./pt-
|
|
12244
|
-
"../../locales/ro.json": () => import("./ro-
|
|
12467
|
+
"../../locales/de.json": () => import("./de-B6IFKV43-9sk50xx0.js"),
|
|
12468
|
+
"../../locales/en.json": () => import("./en-5JIPZTS5-q1x823gc.js"),
|
|
12469
|
+
"../../locales/es-MX.json": () => import("./es-MX-KWITVBWE-w49gknha.js"),
|
|
12470
|
+
"../../locales/es.json": () => import("./es-AQW6PFIU-q2mz247f.js"),
|
|
12471
|
+
"../../locales/fr.json": () => import("./fr-RNWK2TMC-dpyzj366.js"),
|
|
12472
|
+
"../../locales/ja.json": () => import("./ja-DH4I3GEF-ywyhhppa.js"),
|
|
12473
|
+
"../../locales/ko.json": () => import("./ko-R5BCWVO7-whzgmh6q.js"),
|
|
12474
|
+
"../../locales/pt-BR.json": () => import("./pt-BR-6TBBEDQS-y3f2vg5d.js"),
|
|
12475
|
+
"../../locales/pt.json": () => import("./pt-ZSQC5RZ3-8kp3g1z5.js"),
|
|
12476
|
+
"../../locales/ro.json": () => import("./ro-P33AQ6ZL-s92z1mgg.js"),
|
|
12245
12477
|
"../../locales/ru.json": () => import("./ru-WBLQ5B2U-bf20yr5y.js"),
|
|
12246
|
-
"../../locales/tr.json": () => import("./tr-
|
|
12247
|
-
"../../locales/zh-CN.json": () => import("./zh-CN-
|
|
12248
|
-
"../../locales/zh-TW.json": () => import("./zh-TW-
|
|
12478
|
+
"../../locales/tr.json": () => import("./tr-XD73CQAA-tb2nrpyp.js"),
|
|
12479
|
+
"../../locales/zh-CN.json": () => import("./zh-CN-GWP3B2EM-c07fm17a.js"),
|
|
12480
|
+
"../../locales/zh-TW.json": () => import("./zh-TW-2DLUOA7C-9khqnr4r.js")
|
|
12249
12481
|
});
|
|
12250
12482
|
var VALIDATION_NAMESPACE = "validation";
|
|
12251
12483
|
var registerFlowSchemaI18n = createI18nRegistrar({
|
|
@@ -12253,7 +12485,7 @@ var registerFlowSchemaI18n = createI18nRegistrar({
|
|
|
12253
12485
|
englishBundle: en_default,
|
|
12254
12486
|
loadCatalog: (lng) => globImport_locales_json(`../../locales/${lng}.json`)
|
|
12255
12487
|
});
|
|
12256
|
-
// ../../node_modules/@uipath/flow-schema/dist/chunk-
|
|
12488
|
+
// ../../node_modules/@uipath/flow-schema/dist/chunk-SRRRCZFB.js
|
|
12257
12489
|
var JS_EXPRESSION_PREFIX = "=js:";
|
|
12258
12490
|
var expressionFieldTypeSchema = _enum(["string", "number", "boolean", "object", "array", "null"]);
|
|
12259
12491
|
var expressionModeSchema = _enum(["literal", "jsExpression"]);
|
|
@@ -12335,7 +12567,7 @@ var RESERVED_WORDS = [
|
|
|
12335
12567
|
];
|
|
12336
12568
|
var RESERVED_WORD_SET = new Set(RESERVED_WORDS);
|
|
12337
12569
|
|
|
12338
|
-
// ../../node_modules/@uipath/flow-schema/dist/chunk-
|
|
12570
|
+
// ../../node_modules/@uipath/flow-schema/dist/chunk-CQS3MOJQ.js
|
|
12339
12571
|
var import_ajv_errors = __toESM(require_dist(), 1);
|
|
12340
12572
|
|
|
12341
12573
|
// ../../node_modules/i18next/dist/esm/i18next.js
|
|
@@ -15566,7 +15798,7 @@ var ternary = {
|
|
|
15566
15798
|
};
|
|
15567
15799
|
jsep.plugins.register(ternary);
|
|
15568
15800
|
|
|
15569
|
-
// ../../node_modules/@uipath/flow-schema/dist/chunk-
|
|
15801
|
+
// ../../node_modules/@uipath/flow-schema/dist/chunk-CQS3MOJQ.js
|
|
15570
15802
|
var agentEnforcementsSchema = object({
|
|
15571
15803
|
maxTokens: number().nullable(),
|
|
15572
15804
|
maxTemperature: number().nullable(),
|
|
@@ -15606,12 +15838,6 @@ function isAgentNodeType(nodeType2) {
|
|
|
15606
15838
|
var t3 = instance.getFixedT(null, VALIDATION_NAMESPACE);
|
|
15607
15839
|
var t4 = instance.getFixedT(null, VALIDATION_NAMESPACE);
|
|
15608
15840
|
var t5 = instance.getFixedT(null, VALIDATION_NAMESPACE);
|
|
15609
|
-
var ESCALATION_TASK_TYPE = {
|
|
15610
|
-
AppTask: "app-task",
|
|
15611
|
-
QuickForm: "quick-form",
|
|
15612
|
-
DocumentValidationTask: "document-validation-task"
|
|
15613
|
-
};
|
|
15614
|
-
var ESCALATION_TASK_TYPES = new Set(Object.values(ESCALATION_TASK_TYPE));
|
|
15615
15841
|
var DEFAULT_STORAGE_VERSION = currentStorageSchema.version;
|
|
15616
15842
|
var t6 = instance.getFixedT(null, VALIDATION_NAMESPACE);
|
|
15617
15843
|
var t7 = instance.getFixedT(null, VALIDATION_NAMESPACE);
|
|
@@ -16207,44 +16433,215 @@ var RETRY_DEFAULTS = {
|
|
|
16207
16433
|
};
|
|
16208
16434
|
var BACKOFF_TYPES = Object.values(RETRY_BACKOFF);
|
|
16209
16435
|
var t15 = instance.getFixedT(null, VALIDATION_NAMESPACE);
|
|
16210
|
-
var
|
|
16436
|
+
var SWITCH_CASE_HANDLE_PREFIX = "case-";
|
|
16437
|
+
var switchCaseHandle = (caseId) => `${SWITCH_CASE_HANDLE_PREFIX}${caseId}`;
|
|
16438
|
+
function asString2(value) {
|
|
16439
|
+
const raw = isExpressionValue(value) && value.type === "literal" ? decodeLiteral(value) : value;
|
|
16440
|
+
return typeof raw === "string" && raw.trim() ? raw : undefined;
|
|
16441
|
+
}
|
|
16442
|
+
function asBoolean(value) {
|
|
16443
|
+
const raw = isExpressionValue(value) && value.type === "literal" ? decodeLiteral(value) : value;
|
|
16444
|
+
return typeof raw === "boolean" ? raw : undefined;
|
|
16445
|
+
}
|
|
16446
|
+
function asExpressionText(value) {
|
|
16447
|
+
const raw = isExpressionValue(value) ? value.type === "jsExpression" ? value.expression : undefined : typeof value === "string" ? value : undefined;
|
|
16448
|
+
if (raw === undefined)
|
|
16449
|
+
return;
|
|
16450
|
+
const stripped = raw.startsWith(JS_EXPRESSION_PREFIX) ? raw.slice(JS_EXPRESSION_PREFIX.length) : raw;
|
|
16451
|
+
return asString2(stripped);
|
|
16452
|
+
}
|
|
16453
|
+
function getDecisionBranches(inputs) {
|
|
16454
|
+
const expression = asExpressionText(inputs.expression);
|
|
16455
|
+
const trueLabel = asString2(inputs.trueLabel);
|
|
16456
|
+
const falseLabel = asString2(inputs.falseLabel);
|
|
16457
|
+
const effective = expression ?? "false";
|
|
16458
|
+
return [
|
|
16459
|
+
{
|
|
16460
|
+
id: "true",
|
|
16461
|
+
handle: "true",
|
|
16462
|
+
label: trueLabel ?? "True",
|
|
16463
|
+
authoredLabel: trueLabel,
|
|
16464
|
+
expression,
|
|
16465
|
+
condition: effective,
|
|
16466
|
+
isFallback: false
|
|
16467
|
+
},
|
|
16468
|
+
{
|
|
16469
|
+
id: "false",
|
|
16470
|
+
handle: "false",
|
|
16471
|
+
label: falseLabel ?? "False",
|
|
16472
|
+
authoredLabel: falseLabel,
|
|
16473
|
+
expression,
|
|
16474
|
+
condition: `!(${effective}
|
|
16475
|
+
)`,
|
|
16476
|
+
isFallback: true
|
|
16477
|
+
}
|
|
16478
|
+
];
|
|
16479
|
+
}
|
|
16480
|
+
function getCaseEntries(inputs) {
|
|
16481
|
+
const cases = Array.isArray(inputs.cases) ? inputs.cases : [];
|
|
16482
|
+
return cases.filter((entry) => typeof entry === "object" && entry !== null);
|
|
16483
|
+
}
|
|
16484
|
+
function getSwitchBranches(inputs) {
|
|
16485
|
+
const branches = [];
|
|
16486
|
+
getCaseEntries(inputs).forEach(({ id, label, expression }, index) => {
|
|
16487
|
+
const handleId = asString2(id);
|
|
16488
|
+
if (!handleId)
|
|
16489
|
+
return;
|
|
16490
|
+
const branchExpression = asExpressionText(expression);
|
|
16491
|
+
const caseLabel = asString2(label);
|
|
16492
|
+
branches.push({
|
|
16493
|
+
id: handleId,
|
|
16494
|
+
handle: switchCaseHandle(handleId),
|
|
16495
|
+
label: caseLabel ?? `Case ${index + 1}`,
|
|
16496
|
+
authoredLabel: caseLabel,
|
|
16497
|
+
expression: branchExpression,
|
|
16498
|
+
condition: branchExpression ?? "false",
|
|
16499
|
+
isFallback: false
|
|
16500
|
+
});
|
|
16501
|
+
});
|
|
16502
|
+
const defaultBranch = inputs.defaultBranch;
|
|
16503
|
+
const defaultLabel = asString2(defaultBranch?.label);
|
|
16504
|
+
branches.push({
|
|
16505
|
+
id: "default",
|
|
16506
|
+
handle: "default",
|
|
16507
|
+
label: defaultLabel ?? "Default",
|
|
16508
|
+
authoredLabel: defaultLabel,
|
|
16509
|
+
isFallback: true
|
|
16510
|
+
});
|
|
16511
|
+
return branches;
|
|
16512
|
+
}
|
|
16513
|
+
function getSwitchBranchLabels(inputs) {
|
|
16514
|
+
const defaultBranch = inputs.defaultBranch;
|
|
16515
|
+
const enabled = asBoolean(defaultBranch?.enabled);
|
|
16516
|
+
return {
|
|
16517
|
+
cases: getCaseEntries(inputs).map(({ id, label }) => ({ id: asString2(id), label: asString2(label) })),
|
|
16518
|
+
defaultBranch: { label: asString2(defaultBranch?.label), ...enabled !== undefined && { enabled } },
|
|
16519
|
+
...asBoolean(inputs.matchAllCases) === true && { matchAllCases: true }
|
|
16520
|
+
};
|
|
16521
|
+
}
|
|
16522
|
+
var GATEWAYS = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
16523
|
+
[DECISION_NODE_TYPE]: {
|
|
16524
|
+
getBranches: getDecisionBranches,
|
|
16525
|
+
getBranchConditionSources: (inputs) => [inputs],
|
|
16526
|
+
getBranchLabels: (inputs) => ({ trueLabel: asString2(inputs.trueLabel), falseLabel: asString2(inputs.falseLabel) })
|
|
16527
|
+
},
|
|
16528
|
+
[SWITCH_NODE_TYPE]: {
|
|
16529
|
+
getBranches: getSwitchBranches,
|
|
16530
|
+
getBranchConditionSources: getCaseEntries,
|
|
16531
|
+
getBranchLabels: getSwitchBranchLabels
|
|
16532
|
+
}
|
|
16533
|
+
});
|
|
16534
|
+
|
|
16535
|
+
// ../../node_modules/@uipath/flow-schema/dist/index.js
|
|
16536
|
+
var import_object = __toESM(require_index_cjs(), 1);
|
|
16537
|
+
var workflowRuntimeSchema = _enum(["maestro", "api-function"]);
|
|
16538
|
+
var argumentBindingSchema = object({
|
|
16539
|
+
nodeId: string(),
|
|
16540
|
+
outputId: string()
|
|
16541
|
+
});
|
|
16542
|
+
var workflowVariableSchema = object({
|
|
16211
16543
|
id: string().min(1),
|
|
16212
|
-
|
|
16544
|
+
direction: _enum(["in", "out", "inout"]),
|
|
16545
|
+
type: string().default("string"),
|
|
16546
|
+
subType: string().optional(),
|
|
16547
|
+
schema: record(string(), unknown()).optional(),
|
|
16548
|
+
defaultValue: unknown().optional(),
|
|
16213
16549
|
description: string().optional(),
|
|
16214
|
-
|
|
16215
|
-
sortOrder: number().int().nonnegative(),
|
|
16216
|
-
color: string().min(1).optional(),
|
|
16217
|
-
colorDark: string().min(1).optional(),
|
|
16218
|
-
icon: string().min(1).optional(),
|
|
16219
|
-
tags: array(string())
|
|
16220
|
-
});
|
|
16221
|
-
var handleTargetSchema = object({
|
|
16222
|
-
nodeType: string(),
|
|
16223
|
-
handleId: string().optional()
|
|
16550
|
+
triggerNodeId: string().optional()
|
|
16224
16551
|
});
|
|
16225
|
-
var
|
|
16226
|
-
|
|
16227
|
-
|
|
16228
|
-
allowedTargets: array(handleTargetSchema).optional(),
|
|
16229
|
-
forbiddenTargets: array(handleTargetSchema).optional(),
|
|
16230
|
-
allowedSources: array(handleTargetSchema).optional(),
|
|
16231
|
-
forbiddenSources: array(handleTargetSchema).optional(),
|
|
16232
|
-
allowedTargetCategories: array(string()).optional(),
|
|
16233
|
-
forbiddenTargetCategories: array(string()).optional(),
|
|
16234
|
-
allowedSourceCategories: array(string()).optional(),
|
|
16235
|
-
forbiddenSourceCategories: array(string()).optional(),
|
|
16236
|
-
customValidation: string().optional(),
|
|
16237
|
-
validationMessage: string().optional(),
|
|
16238
|
-
severity: _enum([
|
|
16239
|
-
"warning",
|
|
16240
|
-
"error",
|
|
16241
|
-
"critical",
|
|
16242
|
-
"info"
|
|
16243
|
-
]).optional()
|
|
16552
|
+
var variableUpdateSchema = object({
|
|
16553
|
+
variableId: string(),
|
|
16554
|
+
expression: expressionLikeSchema
|
|
16244
16555
|
});
|
|
16245
|
-
var
|
|
16246
|
-
|
|
16247
|
-
"
|
|
16556
|
+
var nodeVariableSchema = object({
|
|
16557
|
+
id: string().min(1),
|
|
16558
|
+
type: string().default("string"),
|
|
16559
|
+
subType: string().optional(),
|
|
16560
|
+
schema: record(string(), unknown()).optional(),
|
|
16561
|
+
description: string().optional(),
|
|
16562
|
+
binding: argumentBindingSchema
|
|
16563
|
+
});
|
|
16564
|
+
var workflowVariablesSchema = object({
|
|
16565
|
+
globals: array(workflowVariableSchema).optional(),
|
|
16566
|
+
nodes: array(nodeVariableSchema).optional(),
|
|
16567
|
+
variableUpdates: record(string(), array(variableUpdateSchema)).optional()
|
|
16568
|
+
});
|
|
16569
|
+
var EMPTY_VARIABLES = Object.freeze({ globals: [], nodes: [], variableUpdates: {} });
|
|
16570
|
+
var workflowConnectionSchema = object({
|
|
16571
|
+
type: _enum(["cloud", "local"]),
|
|
16572
|
+
environment: _enum(["cloud", "staging", "alpha"]).optional(),
|
|
16573
|
+
baseUrl: string().optional(),
|
|
16574
|
+
organizationId: string().optional(),
|
|
16575
|
+
tenantId: string().optional(),
|
|
16576
|
+
tenantName: string().optional(),
|
|
16577
|
+
localUrl: string().url().optional()
|
|
16578
|
+
});
|
|
16579
|
+
var nodeLayoutSchema = looseObject({
|
|
16580
|
+
position: object({ x: number(), y: number() }),
|
|
16581
|
+
size: object({ width: number(), height: number() }).optional(),
|
|
16582
|
+
collapsed: boolean().optional()
|
|
16583
|
+
});
|
|
16584
|
+
var waypointSchema = object({
|
|
16585
|
+
id: string(),
|
|
16586
|
+
x: number(),
|
|
16587
|
+
y: number()
|
|
16588
|
+
});
|
|
16589
|
+
var edgeLayoutSchema = looseObject({
|
|
16590
|
+
waypoints: array(waypointSchema).optional(),
|
|
16591
|
+
routedWaypoints: array(waypointSchema).optional()
|
|
16592
|
+
});
|
|
16593
|
+
var layoutSchema = object({
|
|
16594
|
+
nodes: record(string(), nodeLayoutSchema),
|
|
16595
|
+
edges: record(string(), edgeLayoutSchema).optional()
|
|
16596
|
+
});
|
|
16597
|
+
var bindingSchema = object({
|
|
16598
|
+
id: string(),
|
|
16599
|
+
name: string(),
|
|
16600
|
+
type: string(),
|
|
16601
|
+
resource: string(),
|
|
16602
|
+
resourceKey: string(),
|
|
16603
|
+
default: string().optional(),
|
|
16604
|
+
propertyAttribute: string().optional(),
|
|
16605
|
+
resourceSubType: string().optional()
|
|
16606
|
+
});
|
|
16607
|
+
var categoryManifestSchema = object({
|
|
16608
|
+
id: string().min(1),
|
|
16609
|
+
name: string().min(1),
|
|
16610
|
+
description: string().optional(),
|
|
16611
|
+
parentId: string().optional(),
|
|
16612
|
+
sortOrder: number().int().nonnegative(),
|
|
16613
|
+
color: string().min(1).optional(),
|
|
16614
|
+
colorDark: string().min(1).optional(),
|
|
16615
|
+
icon: string().min(1).optional(),
|
|
16616
|
+
tags: array(string())
|
|
16617
|
+
});
|
|
16618
|
+
var handleTargetSchema = object({
|
|
16619
|
+
nodeType: string(),
|
|
16620
|
+
handleId: string().optional()
|
|
16621
|
+
});
|
|
16622
|
+
var connectionConstraintSchema = object({
|
|
16623
|
+
maxConnections: number().int().positive().optional(),
|
|
16624
|
+
minConnections: number().int().nonnegative().optional(),
|
|
16625
|
+
allowedTargets: array(handleTargetSchema).optional(),
|
|
16626
|
+
forbiddenTargets: array(handleTargetSchema).optional(),
|
|
16627
|
+
allowedSources: array(handleTargetSchema).optional(),
|
|
16628
|
+
forbiddenSources: array(handleTargetSchema).optional(),
|
|
16629
|
+
allowedTargetCategories: array(string()).optional(),
|
|
16630
|
+
forbiddenTargetCategories: array(string()).optional(),
|
|
16631
|
+
allowedSourceCategories: array(string()).optional(),
|
|
16632
|
+
forbiddenSourceCategories: array(string()).optional(),
|
|
16633
|
+
customValidation: string().optional(),
|
|
16634
|
+
validationMessage: string().optional(),
|
|
16635
|
+
severity: _enum([
|
|
16636
|
+
"warning",
|
|
16637
|
+
"error",
|
|
16638
|
+
"critical",
|
|
16639
|
+
"info"
|
|
16640
|
+
]).optional()
|
|
16641
|
+
});
|
|
16642
|
+
var handlePositionSchema = _enum([
|
|
16643
|
+
"left",
|
|
16644
|
+
"top",
|
|
16248
16645
|
"right",
|
|
16249
16646
|
"bottom"
|
|
16250
16647
|
]);
|
|
@@ -16439,14 +16836,14 @@ var displayConfigSchema = object({
|
|
|
16439
16836
|
footerVariant: string().optional(),
|
|
16440
16837
|
shadow: boolean().optional()
|
|
16441
16838
|
}).catchall(unknown());
|
|
16442
|
-
var
|
|
16839
|
+
var waypointSchema2 = object({
|
|
16443
16840
|
id: string().min(1),
|
|
16444
16841
|
x: number(),
|
|
16445
16842
|
y: number()
|
|
16446
16843
|
});
|
|
16447
16844
|
var edgeUiSchema = object({
|
|
16448
|
-
waypoints: array(
|
|
16449
|
-
routedWaypoints: array(
|
|
16845
|
+
waypoints: array(waypointSchema2).optional(),
|
|
16846
|
+
routedWaypoints: array(waypointSchema2).optional(),
|
|
16450
16847
|
autoRouted: boolean().optional()
|
|
16451
16848
|
}).catchall(unknown());
|
|
16452
16849
|
var edgeSchema = object({
|
|
@@ -16485,83 +16882,14 @@ var nodeSchema = object({
|
|
|
16485
16882
|
model: unknown().optional(),
|
|
16486
16883
|
parentId: idSchema.optional()
|
|
16487
16884
|
});
|
|
16488
|
-
var workflowRuntimeSchema = _enum(["maestro", "api-function"]);
|
|
16489
|
-
var argumentBindingSchema = object({
|
|
16490
|
-
nodeId: string(),
|
|
16491
|
-
outputId: string()
|
|
16492
|
-
});
|
|
16493
|
-
var workflowVariableSchema = object({
|
|
16494
|
-
id: string().min(1),
|
|
16495
|
-
direction: _enum(["in", "out", "inout"]),
|
|
16496
|
-
type: string().default("string"),
|
|
16497
|
-
subType: string().optional(),
|
|
16498
|
-
schema: record(string(), unknown()).optional(),
|
|
16499
|
-
defaultValue: unknown().optional(),
|
|
16500
|
-
description: string().optional(),
|
|
16501
|
-
triggerNodeId: string().optional()
|
|
16502
|
-
});
|
|
16503
|
-
var variableUpdateSchema = object({
|
|
16504
|
-
variableId: string(),
|
|
16505
|
-
expression: expressionLikeSchema
|
|
16506
|
-
});
|
|
16507
|
-
var nodeVariableSchema = object({
|
|
16508
|
-
id: string().min(1),
|
|
16509
|
-
type: string().default("string"),
|
|
16510
|
-
subType: string().optional(),
|
|
16511
|
-
schema: record(string(), unknown()).optional(),
|
|
16512
|
-
description: string().optional(),
|
|
16513
|
-
binding: argumentBindingSchema
|
|
16514
|
-
});
|
|
16515
|
-
var workflowVariablesSchema = object({
|
|
16516
|
-
globals: array(workflowVariableSchema).optional(),
|
|
16517
|
-
nodes: array(nodeVariableSchema).optional(),
|
|
16518
|
-
variableUpdates: record(string(), array(variableUpdateSchema)).optional()
|
|
16519
|
-
});
|
|
16520
|
-
var EMPTY_VARIABLES = Object.freeze({ globals: [], nodes: [], variableUpdates: {} });
|
|
16521
|
-
var workflowConnectionSchema = object({
|
|
16522
|
-
type: _enum(["cloud", "local"]),
|
|
16523
|
-
environment: _enum(["cloud", "staging", "alpha"]).optional(),
|
|
16524
|
-
baseUrl: string().optional(),
|
|
16525
|
-
organizationId: string().optional(),
|
|
16526
|
-
tenantId: string().optional(),
|
|
16527
|
-
tenantName: string().optional(),
|
|
16528
|
-
localUrl: string().url().optional()
|
|
16529
|
-
});
|
|
16530
|
-
var nodeLayoutSchema = looseObject({
|
|
16531
|
-
position: object({ x: number(), y: number() }),
|
|
16532
|
-
size: object({ width: number(), height: number() }).optional(),
|
|
16533
|
-
collapsed: boolean().optional()
|
|
16534
|
-
});
|
|
16535
|
-
var waypointSchema2 = object({
|
|
16536
|
-
id: string(),
|
|
16537
|
-
x: number(),
|
|
16538
|
-
y: number()
|
|
16539
|
-
});
|
|
16540
|
-
var edgeLayoutSchema = looseObject({
|
|
16541
|
-
waypoints: array(waypointSchema2).optional(),
|
|
16542
|
-
routedWaypoints: array(waypointSchema2).optional()
|
|
16543
|
-
});
|
|
16544
|
-
var layoutSchema = object({
|
|
16545
|
-
nodes: record(string(), nodeLayoutSchema),
|
|
16546
|
-
edges: record(string(), edgeLayoutSchema).optional()
|
|
16547
|
-
});
|
|
16548
|
-
var bindingSchema = object({
|
|
16549
|
-
id: string(),
|
|
16550
|
-
name: string(),
|
|
16551
|
-
type: string(),
|
|
16552
|
-
resource: string(),
|
|
16553
|
-
resourceKey: string(),
|
|
16554
|
-
default: string().optional(),
|
|
16555
|
-
propertyAttribute: string().optional(),
|
|
16556
|
-
resourceSubType: string().optional()
|
|
16557
|
-
});
|
|
16558
16885
|
var nodeUniqueIdSchema = uuid();
|
|
16559
16886
|
var edgeSchema2 = edgeSchema.extend({
|
|
16560
16887
|
ui: edgeLayoutSchema.optional()
|
|
16561
16888
|
});
|
|
16562
16889
|
var nodeSchema2 = nodeSchema.extend({
|
|
16563
16890
|
typeVersion: string().regex(/^\d+\.\d+(\.\d+)?$/, 'Version must be in format "x.y" or "x.y.z"'),
|
|
16564
|
-
uniqueId: nodeUniqueIdSchema.optional().catch(undefined)
|
|
16891
|
+
uniqueId: nodeUniqueIdSchema.optional().catch(undefined),
|
|
16892
|
+
disabled: boolean().optional()
|
|
16565
16893
|
});
|
|
16566
16894
|
var nodeManifestSchema2 = lazy(() => nodeManifestSchema.extend({
|
|
16567
16895
|
display: nodeDisplayManifestSchema.extend({ isPreview: boolean().optional() }),
|
|
@@ -16575,106 +16903,6 @@ var categoryManifestSchema2 = lazy(() => categoryManifestSchema.extend({
|
|
|
16575
16903
|
displayIfEmpty: boolean().optional()
|
|
16576
16904
|
}));
|
|
16577
16905
|
var versionSchema2 = string().regex(/^\d+\.\d+(\.\d+)?$/, 'Version must be in format "x.y" or "x.y.z"');
|
|
16578
|
-
var SWITCH_CASE_HANDLE_PREFIX = "case-";
|
|
16579
|
-
var switchCaseHandle = (caseId) => `${SWITCH_CASE_HANDLE_PREFIX}${caseId}`;
|
|
16580
|
-
function asString2(value) {
|
|
16581
|
-
const raw = isExpressionValue(value) && value.type === "literal" ? decodeLiteral(value) : value;
|
|
16582
|
-
return typeof raw === "string" && raw.trim() ? raw : undefined;
|
|
16583
|
-
}
|
|
16584
|
-
function asBoolean(value) {
|
|
16585
|
-
const raw = isExpressionValue(value) && value.type === "literal" ? decodeLiteral(value) : value;
|
|
16586
|
-
return typeof raw === "boolean" ? raw : undefined;
|
|
16587
|
-
}
|
|
16588
|
-
function asExpressionText(value) {
|
|
16589
|
-
const raw = isExpressionValue(value) ? value.type === "jsExpression" ? value.expression : undefined : typeof value === "string" ? value : undefined;
|
|
16590
|
-
if (raw === undefined)
|
|
16591
|
-
return;
|
|
16592
|
-
const stripped = raw.startsWith(JS_EXPRESSION_PREFIX) ? raw.slice(JS_EXPRESSION_PREFIX.length) : raw;
|
|
16593
|
-
return asString2(stripped);
|
|
16594
|
-
}
|
|
16595
|
-
function getDecisionBranches(inputs) {
|
|
16596
|
-
const expression = asExpressionText(inputs.expression);
|
|
16597
|
-
const trueLabel = asString2(inputs.trueLabel);
|
|
16598
|
-
const falseLabel = asString2(inputs.falseLabel);
|
|
16599
|
-
const effective = expression ?? "false";
|
|
16600
|
-
return [
|
|
16601
|
-
{
|
|
16602
|
-
id: "true",
|
|
16603
|
-
handle: "true",
|
|
16604
|
-
label: trueLabel ?? "True",
|
|
16605
|
-
authoredLabel: trueLabel,
|
|
16606
|
-
expression,
|
|
16607
|
-
condition: effective,
|
|
16608
|
-
isFallback: false
|
|
16609
|
-
},
|
|
16610
|
-
{
|
|
16611
|
-
id: "false",
|
|
16612
|
-
handle: "false",
|
|
16613
|
-
label: falseLabel ?? "False",
|
|
16614
|
-
authoredLabel: falseLabel,
|
|
16615
|
-
expression,
|
|
16616
|
-
condition: `!(${effective}
|
|
16617
|
-
)`,
|
|
16618
|
-
isFallback: true
|
|
16619
|
-
}
|
|
16620
|
-
];
|
|
16621
|
-
}
|
|
16622
|
-
function getCaseEntries(inputs) {
|
|
16623
|
-
const cases = Array.isArray(inputs.cases) ? inputs.cases : [];
|
|
16624
|
-
return cases.filter((entry) => typeof entry === "object" && entry !== null);
|
|
16625
|
-
}
|
|
16626
|
-
function getSwitchBranches(inputs) {
|
|
16627
|
-
const branches = [];
|
|
16628
|
-
getCaseEntries(inputs).forEach(({ id, label, expression }, index) => {
|
|
16629
|
-
const handleId = asString2(id);
|
|
16630
|
-
if (!handleId)
|
|
16631
|
-
return;
|
|
16632
|
-
const branchExpression = asExpressionText(expression);
|
|
16633
|
-
const caseLabel = asString2(label);
|
|
16634
|
-
branches.push({
|
|
16635
|
-
id: handleId,
|
|
16636
|
-
handle: switchCaseHandle(handleId),
|
|
16637
|
-
label: caseLabel ?? `Case ${index + 1}`,
|
|
16638
|
-
authoredLabel: caseLabel,
|
|
16639
|
-
expression: branchExpression,
|
|
16640
|
-
condition: branchExpression ?? "false",
|
|
16641
|
-
isFallback: false
|
|
16642
|
-
});
|
|
16643
|
-
});
|
|
16644
|
-
const defaultBranch = inputs.defaultBranch;
|
|
16645
|
-
const defaultLabel = asString2(defaultBranch?.label);
|
|
16646
|
-
branches.push({
|
|
16647
|
-
id: "default",
|
|
16648
|
-
handle: "default",
|
|
16649
|
-
label: defaultLabel ?? "Default",
|
|
16650
|
-
authoredLabel: defaultLabel,
|
|
16651
|
-
isFallback: true
|
|
16652
|
-
});
|
|
16653
|
-
return branches;
|
|
16654
|
-
}
|
|
16655
|
-
function getSwitchBranchLabels(inputs) {
|
|
16656
|
-
const defaultBranch = inputs.defaultBranch;
|
|
16657
|
-
const enabled = asBoolean(defaultBranch?.enabled);
|
|
16658
|
-
return {
|
|
16659
|
-
cases: getCaseEntries(inputs).map(({ id, label }) => ({ id: asString2(id), label: asString2(label) })),
|
|
16660
|
-
defaultBranch: { label: asString2(defaultBranch?.label), ...enabled !== undefined && { enabled } }
|
|
16661
|
-
};
|
|
16662
|
-
}
|
|
16663
|
-
var GATEWAYS = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
16664
|
-
[DECISION_NODE_TYPE]: {
|
|
16665
|
-
getBranches: getDecisionBranches,
|
|
16666
|
-
getBranchConditionSources: (inputs) => [inputs],
|
|
16667
|
-
getBranchLabels: (inputs) => ({ trueLabel: asString2(inputs.trueLabel), falseLabel: asString2(inputs.falseLabel) })
|
|
16668
|
-
},
|
|
16669
|
-
[SWITCH_NODE_TYPE]: {
|
|
16670
|
-
getBranches: getSwitchBranches,
|
|
16671
|
-
getBranchConditionSources: getCaseEntries,
|
|
16672
|
-
getBranchLabels: getSwitchBranchLabels
|
|
16673
|
-
}
|
|
16674
|
-
});
|
|
16675
|
-
|
|
16676
|
-
// ../../node_modules/@uipath/flow-schema/dist/index.js
|
|
16677
|
-
var import_object = __toESM(require_index_cjs(), 1);
|
|
16678
16906
|
var subflowEntrySchema = object({
|
|
16679
16907
|
nodes: array(nodeSchema2),
|
|
16680
16908
|
edges: array(edgeSchema2),
|
|
@@ -17963,12 +18191,232 @@ class TextApiResponse {
|
|
|
17963
18191
|
return await this.raw.text();
|
|
17964
18192
|
}
|
|
17965
18193
|
}
|
|
18194
|
+
|
|
18195
|
+
// ../integrationservice-sdk/generated/folder-auth/src/runtime.ts
|
|
18196
|
+
var BASE_PATH4 = "https://alpha.uipath.com/entity/Azure/elements_".replace(/\/+$/, "");
|
|
18197
|
+
|
|
18198
|
+
class Configuration4 {
|
|
18199
|
+
configuration;
|
|
18200
|
+
constructor(configuration = {}) {
|
|
18201
|
+
this.configuration = configuration;
|
|
18202
|
+
}
|
|
18203
|
+
set config(configuration) {
|
|
18204
|
+
this.configuration = configuration;
|
|
18205
|
+
}
|
|
18206
|
+
get basePath() {
|
|
18207
|
+
return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH4;
|
|
18208
|
+
}
|
|
18209
|
+
get fetchApi() {
|
|
18210
|
+
return this.configuration.fetchApi;
|
|
18211
|
+
}
|
|
18212
|
+
get middleware() {
|
|
18213
|
+
return this.configuration.middleware || [];
|
|
18214
|
+
}
|
|
18215
|
+
get queryParamsStringify() {
|
|
18216
|
+
return this.configuration.queryParamsStringify || querystring4;
|
|
18217
|
+
}
|
|
18218
|
+
get username() {
|
|
18219
|
+
return this.configuration.username;
|
|
18220
|
+
}
|
|
18221
|
+
get password() {
|
|
18222
|
+
return this.configuration.password;
|
|
18223
|
+
}
|
|
18224
|
+
get apiKey() {
|
|
18225
|
+
const apiKey = this.configuration.apiKey;
|
|
18226
|
+
if (apiKey) {
|
|
18227
|
+
return typeof apiKey === "function" ? apiKey : () => apiKey;
|
|
18228
|
+
}
|
|
18229
|
+
return;
|
|
18230
|
+
}
|
|
18231
|
+
get accessToken() {
|
|
18232
|
+
const accessToken = this.configuration.accessToken;
|
|
18233
|
+
if (accessToken) {
|
|
18234
|
+
return typeof accessToken === "function" ? accessToken : async () => accessToken;
|
|
18235
|
+
}
|
|
18236
|
+
return;
|
|
18237
|
+
}
|
|
18238
|
+
get headers() {
|
|
18239
|
+
return this.configuration.headers;
|
|
18240
|
+
}
|
|
18241
|
+
get credentials() {
|
|
18242
|
+
return this.configuration.credentials;
|
|
18243
|
+
}
|
|
18244
|
+
}
|
|
18245
|
+
var DefaultConfig4 = new Configuration4;
|
|
18246
|
+
|
|
18247
|
+
class BaseAPI4 {
|
|
18248
|
+
configuration;
|
|
18249
|
+
static jsonRegex = new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", "i");
|
|
18250
|
+
middleware;
|
|
18251
|
+
constructor(configuration = DefaultConfig4) {
|
|
18252
|
+
this.configuration = configuration;
|
|
18253
|
+
this.middleware = configuration.middleware;
|
|
18254
|
+
}
|
|
18255
|
+
withMiddleware(...middlewares) {
|
|
18256
|
+
const next = this.clone();
|
|
18257
|
+
next.middleware = next.middleware.concat(...middlewares);
|
|
18258
|
+
return next;
|
|
18259
|
+
}
|
|
18260
|
+
withPreMiddleware(...preMiddlewares) {
|
|
18261
|
+
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
|
18262
|
+
return this.withMiddleware(...middlewares);
|
|
18263
|
+
}
|
|
18264
|
+
withPostMiddleware(...postMiddlewares) {
|
|
18265
|
+
const middlewares = postMiddlewares.map((post) => ({ post }));
|
|
18266
|
+
return this.withMiddleware(...middlewares);
|
|
18267
|
+
}
|
|
18268
|
+
isJsonMime(mime) {
|
|
18269
|
+
if (!mime) {
|
|
18270
|
+
return false;
|
|
18271
|
+
}
|
|
18272
|
+
return BaseAPI4.jsonRegex.test(mime);
|
|
18273
|
+
}
|
|
18274
|
+
async request(context, initOverrides) {
|
|
18275
|
+
const { url, init } = await this.createFetchParams(context, initOverrides);
|
|
18276
|
+
const response = await this.fetchApi(url, init);
|
|
18277
|
+
if (response && (response.status >= 200 && response.status < 300)) {
|
|
18278
|
+
return response;
|
|
18279
|
+
}
|
|
18280
|
+
throw new ResponseError4(response, "Response returned an error code");
|
|
18281
|
+
}
|
|
18282
|
+
async createFetchParams(context, initOverrides) {
|
|
18283
|
+
let url = this.configuration.basePath + context.path;
|
|
18284
|
+
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
18285
|
+
url += "?" + this.configuration.queryParamsStringify(context.query);
|
|
18286
|
+
}
|
|
18287
|
+
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
18288
|
+
Object.keys(headers).forEach((key) => headers[key] === undefined ? delete headers[key] : {});
|
|
18289
|
+
const initOverrideFn = typeof initOverrides === "function" ? initOverrides : async () => initOverrides;
|
|
18290
|
+
const initParams = {
|
|
18291
|
+
method: context.method,
|
|
18292
|
+
headers,
|
|
18293
|
+
body: context.body,
|
|
18294
|
+
credentials: this.configuration.credentials
|
|
18295
|
+
};
|
|
18296
|
+
const overriddenInit = {
|
|
18297
|
+
...initParams,
|
|
18298
|
+
...await initOverrideFn({
|
|
18299
|
+
init: initParams,
|
|
18300
|
+
context
|
|
18301
|
+
})
|
|
18302
|
+
};
|
|
18303
|
+
let body;
|
|
18304
|
+
if (isFormData4(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob4(overriddenInit.body)) {
|
|
18305
|
+
body = overriddenInit.body;
|
|
18306
|
+
} else if (this.isJsonMime(headers["Content-Type"])) {
|
|
18307
|
+
body = JSON.stringify(overriddenInit.body);
|
|
18308
|
+
} else {
|
|
18309
|
+
body = overriddenInit.body;
|
|
18310
|
+
}
|
|
18311
|
+
const init = {
|
|
18312
|
+
...overriddenInit,
|
|
18313
|
+
body
|
|
18314
|
+
};
|
|
18315
|
+
return { url, init };
|
|
18316
|
+
}
|
|
18317
|
+
fetchApi = async (url, init) => {
|
|
18318
|
+
let fetchParams = { url, init };
|
|
18319
|
+
for (const middleware of this.middleware) {
|
|
18320
|
+
if (middleware.pre) {
|
|
18321
|
+
fetchParams = await middleware.pre({
|
|
18322
|
+
fetch: this.fetchApi,
|
|
18323
|
+
...fetchParams
|
|
18324
|
+
}) || fetchParams;
|
|
18325
|
+
}
|
|
18326
|
+
}
|
|
18327
|
+
let response = undefined;
|
|
18328
|
+
try {
|
|
18329
|
+
response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
|
18330
|
+
} catch (e) {
|
|
18331
|
+
for (const middleware of this.middleware) {
|
|
18332
|
+
if (middleware.onError) {
|
|
18333
|
+
response = await middleware.onError({
|
|
18334
|
+
fetch: this.fetchApi,
|
|
18335
|
+
url: fetchParams.url,
|
|
18336
|
+
init: fetchParams.init,
|
|
18337
|
+
error: e,
|
|
18338
|
+
response: response ? response.clone() : undefined
|
|
18339
|
+
}) || response;
|
|
18340
|
+
}
|
|
18341
|
+
}
|
|
18342
|
+
if (response === undefined) {
|
|
18343
|
+
if (e instanceof Error) {
|
|
18344
|
+
throw new FetchError4(e, "The request failed and the interceptors did not return an alternative response");
|
|
18345
|
+
} else {
|
|
18346
|
+
throw e;
|
|
18347
|
+
}
|
|
18348
|
+
}
|
|
18349
|
+
}
|
|
18350
|
+
for (const middleware of this.middleware) {
|
|
18351
|
+
if (middleware.post) {
|
|
18352
|
+
response = await middleware.post({
|
|
18353
|
+
fetch: this.fetchApi,
|
|
18354
|
+
url: fetchParams.url,
|
|
18355
|
+
init: fetchParams.init,
|
|
18356
|
+
response: response.clone()
|
|
18357
|
+
}) || response;
|
|
18358
|
+
}
|
|
18359
|
+
}
|
|
18360
|
+
return response;
|
|
18361
|
+
};
|
|
18362
|
+
clone() {
|
|
18363
|
+
const constructor = this.constructor;
|
|
18364
|
+
const next = new constructor(this.configuration);
|
|
18365
|
+
next.middleware = this.middleware.slice();
|
|
18366
|
+
return next;
|
|
18367
|
+
}
|
|
18368
|
+
}
|
|
18369
|
+
function isBlob4(value) {
|
|
18370
|
+
return typeof Blob !== "undefined" && value instanceof Blob;
|
|
18371
|
+
}
|
|
18372
|
+
function isFormData4(value) {
|
|
18373
|
+
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
18374
|
+
}
|
|
18375
|
+
|
|
18376
|
+
class ResponseError4 extends Error {
|
|
18377
|
+
response;
|
|
18378
|
+
name = "ResponseError";
|
|
18379
|
+
constructor(response, msg) {
|
|
18380
|
+
super(msg);
|
|
18381
|
+
this.response = response;
|
|
18382
|
+
}
|
|
18383
|
+
}
|
|
18384
|
+
|
|
18385
|
+
class FetchError4 extends Error {
|
|
18386
|
+
cause;
|
|
18387
|
+
name = "FetchError";
|
|
18388
|
+
constructor(cause, msg) {
|
|
18389
|
+
super(msg);
|
|
18390
|
+
this.cause = cause;
|
|
18391
|
+
}
|
|
18392
|
+
}
|
|
18393
|
+
function querystring4(params, prefix = "") {
|
|
18394
|
+
return Object.keys(params).map((key) => querystringSingleKey4(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
|
|
18395
|
+
}
|
|
18396
|
+
function querystringSingleKey4(key, value, keyPrefix = "") {
|
|
18397
|
+
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
|
|
18398
|
+
if (value instanceof Array) {
|
|
18399
|
+
const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
|
|
18400
|
+
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
|
18401
|
+
}
|
|
18402
|
+
if (value instanceof Set) {
|
|
18403
|
+
const valueAsArray = Array.from(value);
|
|
18404
|
+
return querystringSingleKey4(key, valueAsArray, keyPrefix);
|
|
18405
|
+
}
|
|
18406
|
+
if (value instanceof Date) {
|
|
18407
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
|
|
18408
|
+
}
|
|
18409
|
+
if (value instanceof Object) {
|
|
18410
|
+
return querystring4(value, fullKey);
|
|
18411
|
+
}
|
|
18412
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
|
18413
|
+
}
|
|
17966
18414
|
// ../integrationservice-sdk/package.json
|
|
17967
18415
|
var package_default3 = {
|
|
17968
18416
|
name: "@uipath/integrationservice-sdk",
|
|
17969
18417
|
author: "UiPath",
|
|
17970
18418
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
17971
|
-
version: "1.
|
|
18419
|
+
version: "1.207.0-preview.305",
|
|
17972
18420
|
repository: {
|
|
17973
18421
|
type: "git",
|
|
17974
18422
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -18027,6 +18475,7 @@ var package_default3 = {
|
|
|
18027
18475
|
var SDK_USER_AGENT2 = getSdkUserAgentToken(package_default3);
|
|
18028
18476
|
installSdkUserAgentHeader(BaseAPI2, SDK_USER_AGENT2);
|
|
18029
18477
|
installSdkUserAgentHeader(BaseAPI3, SDK_USER_AGENT2);
|
|
18478
|
+
installSdkUserAgentHeader(BaseAPI4, SDK_USER_AGENT2);
|
|
18030
18479
|
// ../integrationservice-sdk/generated/connections/src/models/AccessTokenResponse.ts
|
|
18031
18480
|
function AccessTokenResponseFromJSON(json) {
|
|
18032
18481
|
return AccessTokenResponseFromJSONTyped(json, false);
|
|
@@ -24872,7 +25321,7 @@ var STRUCTURAL_AGENT_INPUT_KEYS = new Set([
|
|
|
24872
25321
|
"conversationalAgentSettings"
|
|
24873
25322
|
]);
|
|
24874
25323
|
var RESOURCE_KEEP_KEYS = new Set(["source", "detail", "itemsDescription"]);
|
|
24875
|
-
var
|
|
25324
|
+
var AGENT_RESOURCE_SOURCE_HANDLES = new Set([
|
|
24876
25325
|
"memory",
|
|
24877
25326
|
"context",
|
|
24878
25327
|
"tool",
|
|
@@ -24923,7 +25372,7 @@ function shellifyInlineAgents(flow, options) {
|
|
|
24923
25372
|
for (const edge of edges) {
|
|
24924
25373
|
if (!edge || edge.sourceNodeId !== node.id)
|
|
24925
25374
|
continue;
|
|
24926
|
-
if (!edge.sourcePort || !
|
|
25375
|
+
if (!edge.sourcePort || !AGENT_RESOURCE_SOURCE_HANDLES.has(edge.sourcePort)) {
|
|
24927
25376
|
continue;
|
|
24928
25377
|
}
|
|
24929
25378
|
const target = edge.targetNodeId ? nodeById.get(edge.targetNodeId) : undefined;
|
|
@@ -24945,6 +25394,9 @@ function shellifyInlineAgents(flow, options) {
|
|
|
24945
25394
|
function err(path, message) {
|
|
24946
25395
|
return { path, message };
|
|
24947
25396
|
}
|
|
25397
|
+
function hasOnlyContentTokenErrors(errors) {
|
|
25398
|
+
return errors.length > 0 && errors.every((error) => error.path.startsWith("messages[") && error.path.includes("].contentTokens"));
|
|
25399
|
+
}
|
|
24948
25400
|
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
24949
25401
|
function isUuid(v) {
|
|
24950
25402
|
return typeof v === "string" && UUID_RE.test(v);
|
|
@@ -25256,7 +25708,7 @@ function missingAgentInstructions(agentPath, inline, inlineCandidates) {
|
|
|
25256
25708
|
}
|
|
25257
25709
|
return `No agent.json found at "${agentPath}". ` + "When validating an inline agent, pass either the generated inline agent child directory " + "or the flow project directory that contains exactly one inline agent. " + "Create one first with `uip agent init --inline-in-flow <flow-project>`.";
|
|
25258
25710
|
}
|
|
25259
|
-
async function performStaticValidation(targetPath, options) {
|
|
25711
|
+
async function performStaticValidation(targetPath, options, command) {
|
|
25260
25712
|
const fs = getFileSystem();
|
|
25261
25713
|
const inline = options.inlineInFlow === true;
|
|
25262
25714
|
const requestedProjectDir = fs.path.resolve(targetPath);
|
|
@@ -25264,6 +25716,9 @@ async function performStaticValidation(targetPath, options) {
|
|
|
25264
25716
|
const projectDir = resolvedProject.projectDir;
|
|
25265
25717
|
const agentPath = resolvedProject.agentPath;
|
|
25266
25718
|
const staticErrors = [];
|
|
25719
|
+
if (projectDir !== requestedProjectDir) {
|
|
25720
|
+
await setProjectTelemetryTarget(command, projectDir);
|
|
25721
|
+
}
|
|
25267
25722
|
if (!await fs.exists(agentPath)) {
|
|
25268
25723
|
OutputFormatter.error({
|
|
25269
25724
|
Result: RESULTS.Failure,
|
|
@@ -25446,7 +25901,7 @@ var VALIDATE_EXAMPLES = [
|
|
|
25446
25901
|
}
|
|
25447
25902
|
];
|
|
25448
25903
|
var registerValidateCommand = (program) => {
|
|
25449
|
-
program.command("validate").description("Validate an agent project against the current schema. Strict read-only. " + "Answers a single question: would Studio Web accept this directory as-is? " + "Does not write any files. If the project's storage schema is behind, or " + "if `entry-points.json` / `bindings_v2.json` drifted from source, validate " + "fails with a code pointing at `uip agent refresh`.\n" + "With --inline-in-flow, skips entry-points.json/project.uiproj checks.").argument("[path]", "Agent project directory (default: current directory)").option("--inline-in-flow", "Validate an inline agent inside a flow project. " + "Skips entry-points.json and project.uiproj checks.").option("--path <path>", "Path to agent project directory").option("--bindings-target <path>", "Path to the bindings_v2.json file to compare against (mirrors `uip agent refresh`). " + "Defaults to <projectDir>/bindings_v2.json for standalone agents. " + "For --inline-in-flow, defaults to <parentDir>/bindings_v2.json when the " + "immediate parent directory contains a `.flow` file; pass this option to override.").examples(VALIDATE_EXAMPLES).trackedAction(processContext, async (targetPath, options) => {
|
|
25904
|
+
program.command("validate").description("Validate an agent project against the current schema. Strict read-only. " + "Answers a single question: would Studio Web accept this directory as-is? " + "Does not write any files. If the project's storage schema is behind, or " + "if `entry-points.json` / `bindings_v2.json` drifted from source, validate " + "fails with a code pointing at `uip agent refresh`.\n" + "With --inline-in-flow, skips entry-points.json/project.uiproj checks.").argument("[path]", "Agent project directory (default: current directory)").option("--inline-in-flow", "Validate an inline agent inside a flow project. " + "Skips entry-points.json and project.uiproj checks.").option("--path <path>", "Path to agent project directory").option("--bindings-target <path>", "Path to the bindings_v2.json file to compare against (mirrors `uip agent refresh`). " + "Defaults to <projectDir>/bindings_v2.json for standalone agents. " + "For --inline-in-flow, defaults to <parentDir>/bindings_v2.json when the " + "immediate parent directory contains a `.flow` file; pass this option to override.").examples(VALIDATE_EXAMPLES).trackedAction(processContext, async (targetPath, options, command) => {
|
|
25450
25905
|
const [projectPathError, projectPath] = catchError(() => resolveValidateProjectPath(targetPath, options.path));
|
|
25451
25906
|
if (projectPathError) {
|
|
25452
25907
|
OutputFormatter.error({
|
|
@@ -25460,18 +25915,19 @@ var registerValidateCommand = (program) => {
|
|
|
25460
25915
|
}
|
|
25461
25916
|
const [error] = await catchError((async () => {
|
|
25462
25917
|
const fs = getFileSystem();
|
|
25463
|
-
const staticResult = await performStaticValidation(projectPath, options);
|
|
25918
|
+
const staticResult = await performStaticValidation(projectPath, options, command);
|
|
25464
25919
|
if (!staticResult.ok) {
|
|
25465
25920
|
if (staticResult.handled)
|
|
25466
25921
|
return;
|
|
25922
|
+
const contentTokensOutdated = hasOnlyContentTokenErrors(staticResult.errors);
|
|
25467
25923
|
OutputFormatter.error({
|
|
25468
25924
|
Result: RESULTS.Failure,
|
|
25469
|
-
Code: "AgentValidationFailed",
|
|
25470
|
-
Message: `Validation failed with ${staticResult.errors.length} error(s)`,
|
|
25925
|
+
Code: contentTokensOutdated ? "AgentContentTokensOutdated" : "AgentValidationFailed",
|
|
25926
|
+
Message: contentTokensOutdated ? "Agent contentTokens are out of date." : `Validation failed with ${staticResult.errors.length} error(s)`,
|
|
25471
25927
|
Data: {
|
|
25472
25928
|
Errors: staticResult.errors.map((e) => e.path ? `${e.path}: ${e.message}` : e.message)
|
|
25473
25929
|
},
|
|
25474
|
-
Instructions: `Fix the errors listed in Data.Errors, then run
|
|
25930
|
+
Instructions: contentTokensOutdated ? "Run `uip agent refresh` to regenerate contentTokens, then run `uip agent validate` again." : "Fix the errors listed in Data.Errors, then run `uip agent validate` again."
|
|
25475
25931
|
});
|
|
25476
25932
|
processContext.exit(1);
|
|
25477
25933
|
return;
|
|
@@ -25680,7 +26136,7 @@ var REFRESH_EXAMPLES = [
|
|
|
25680
26136
|
}
|
|
25681
26137
|
];
|
|
25682
26138
|
var registerRefreshCommand = (program) => {
|
|
25683
|
-
program.command("refresh").description("Apply pending schema migrations and regenerate derived files " + "(`entry-points.json`, `bindings_v2.json`). Creates a missing " + "`project.uiproj`, named after the project directory. Always regenerates " + "artifacts even when the storage schema is already at the latest " + "version. Run after edits, before `uip agent validate`.\n" + "With --inline-in-flow, skips entry-points.json/project.uiproj checks. " + "Agent tool bindings are merged into the parent flow project's bindings_v2.json " + "(auto-detected, override with --bindings-target).").argument("[path]", "Agent project directory (default: current directory)").option("--inline-in-flow", "Refresh an inline agent inside a flow project. " + "Skips entry-points.json and project.uiproj checks. " + "Agent tool bindings are merged into the parent flow project's bindings_v2.json " + "(immediate parent if it contains a `.flow` file; override with --bindings-target).").option("--bindings-target <path>", "Path to the bindings_v2.json file to write/merge agent tool bindings into. " + "Defaults to <projectDir>/bindings_v2.json for standalone agents. " + "For --inline-in-flow, defaults to <parentDir>/bindings_v2.json when the " + "immediate parent directory contains a `.flow` file; pass this option to override.").option("--path <path>", "Path to agent project directory").examples(REFRESH_EXAMPLES).trackedAction(processContext, async (targetPath, options) => {
|
|
26139
|
+
program.command("refresh").description("Apply pending schema migrations and regenerate derived files " + "(`entry-points.json`, `bindings_v2.json`). Creates a missing " + "`project.uiproj`, named after the project directory. Always regenerates " + "artifacts even when the storage schema is already at the latest " + "version. Run after edits, before `uip agent validate`.\n" + "With --inline-in-flow, skips entry-points.json/project.uiproj checks. " + "Agent tool bindings are merged into the parent flow project's bindings_v2.json " + "(auto-detected, override with --bindings-target).").argument("[path]", "Agent project directory (default: current directory)").option("--inline-in-flow", "Refresh an inline agent inside a flow project. " + "Skips entry-points.json and project.uiproj checks. " + "Agent tool bindings are merged into the parent flow project's bindings_v2.json " + "(immediate parent if it contains a `.flow` file; override with --bindings-target).").option("--bindings-target <path>", "Path to the bindings_v2.json file to write/merge agent tool bindings into. " + "Defaults to <projectDir>/bindings_v2.json for standalone agents. " + "For --inline-in-flow, defaults to <parentDir>/bindings_v2.json when the " + "immediate parent directory contains a `.flow` file; pass this option to override.").option("--path <path>", "Path to agent project directory").examples(REFRESH_EXAMPLES).trackedAction(processContext, async (targetPath, options, command) => {
|
|
25684
26140
|
const [projectPathError, projectPath] = catchError(() => resolveValidateProjectPath(targetPath, options.path));
|
|
25685
26141
|
if (projectPathError) {
|
|
25686
26142
|
OutputFormatter.error({
|
|
@@ -25706,7 +26162,7 @@ var registerRefreshCommand = (program) => {
|
|
|
25706
26162
|
const staticResult = await performStaticValidation(projectPath, {
|
|
25707
26163
|
inlineInFlow: options.inlineInFlow,
|
|
25708
26164
|
skipSchemaSync: true
|
|
25709
|
-
});
|
|
26165
|
+
}, command);
|
|
25710
26166
|
if (!staticResult.ok) {
|
|
25711
26167
|
if (staticResult.handled)
|
|
25712
26168
|
return;
|
|
@@ -28155,7 +28611,7 @@ var ADD_EXAMPLES = [
|
|
|
28155
28611
|
];
|
|
28156
28612
|
var COUNT_BOUNDS = { min: 0, max: Number.MAX_SAFE_INTEGER };
|
|
28157
28613
|
var parseCount = (flag) => (raw) => parseBoundedInt(raw, flag, COUNT_BOUNDS);
|
|
28158
|
-
var
|
|
28614
|
+
var reportFailure2 = (rawGrade, outcome) => {
|
|
28159
28615
|
switch (outcome.error) {
|
|
28160
28616
|
case "INVALID_GRADE":
|
|
28161
28617
|
OutputFormatter.error({
|
|
@@ -28207,7 +28663,7 @@ var registerReviewHistoryCommands = (program) => {
|
|
|
28207
28663
|
return;
|
|
28208
28664
|
}
|
|
28209
28665
|
if (!outcome.ok) {
|
|
28210
|
-
|
|
28666
|
+
reportFailure2(grade, outcome);
|
|
28211
28667
|
processContext.exit(1);
|
|
28212
28668
|
return;
|
|
28213
28669
|
}
|
|
@@ -28250,7 +28706,7 @@ var TOOL_LIST_EXAMPLES = [
|
|
|
28250
28706
|
}
|
|
28251
28707
|
];
|
|
28252
28708
|
var registerToolListCommand = (program) => {
|
|
28253
|
-
const tool = program.command("tool").description("
|
|
28709
|
+
const tool = program.command("tool").description("List agent tools. Add a tool as a resources/<Name>/resource.json file.");
|
|
28254
28710
|
tool.command("list").description("List agent tools").option("--path <path>", "Path to agent project directory", ".").examples(TOOL_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
28255
28711
|
const [error] = await catchError((async () => {
|
|
28256
28712
|
const service = new ResourceService;
|
|
@@ -28285,6 +28741,41 @@ var registerToolListCommand = (program) => {
|
|
|
28285
28741
|
});
|
|
28286
28742
|
};
|
|
28287
28743
|
|
|
28744
|
+
// src/telemetry/identity-telemetry.ts
|
|
28745
|
+
var readAgentProjectIdentity = async (target, fs) => {
|
|
28746
|
+
const { ProjectTypes, readIdentityField } = await import("./index-9vtvwe74.js");
|
|
28747
|
+
const projectDirectory = fs.path.resolve(target);
|
|
28748
|
+
const base = { projectDirectory, projectType: ProjectTypes.Agent };
|
|
28749
|
+
const [statError, stat] = await catchError(fs.stat(projectDirectory));
|
|
28750
|
+
if (statError || stat && !stat.isDirectory()) {
|
|
28751
|
+
return { ...base, status: "invalid" };
|
|
28752
|
+
}
|
|
28753
|
+
const [error, id] = await catchError(readIdentityField(fs, fs.path.join(projectDirectory, "agent.json"), [
|
|
28754
|
+
"projectId"
|
|
28755
|
+
]));
|
|
28756
|
+
if (error)
|
|
28757
|
+
return { ...base, status: "invalid" };
|
|
28758
|
+
return id === undefined ? { ...base, status: "missing" } : { ...base, id, status: "resolved" };
|
|
28759
|
+
};
|
|
28760
|
+
var AGENT_IDENTITY_RULES = {
|
|
28761
|
+
debug: { arguments: ["project-path"] },
|
|
28762
|
+
validate: {
|
|
28763
|
+
arguments: ["path"],
|
|
28764
|
+
options: ["path"],
|
|
28765
|
+
defaultTarget: "."
|
|
28766
|
+
},
|
|
28767
|
+
refresh: { arguments: ["path"], options: ["path"], defaultTarget: "." },
|
|
28768
|
+
review: { arguments: ["path"] },
|
|
28769
|
+
"review-history": { arguments: ["path"] },
|
|
28770
|
+
tool: { options: ["path"] },
|
|
28771
|
+
memory: { options: ["path"] },
|
|
28772
|
+
eval: { options: ["path"] },
|
|
28773
|
+
init: { create: true }
|
|
28774
|
+
};
|
|
28775
|
+
function configureAgentTelemetry(program) {
|
|
28776
|
+
configureProjectTelemetry(program, createProjectCommandResolver(program, AGENT_IDENTITY_RULES, (target) => readAgentProjectIdentity(target, getFileSystem())));
|
|
28777
|
+
}
|
|
28778
|
+
|
|
28288
28779
|
// src/tool.ts
|
|
28289
28780
|
var metadata2 = {
|
|
28290
28781
|
name: "agent-tool",
|
|
@@ -28304,8 +28795,9 @@ var registerCommands2 = async (program) => {
|
|
|
28304
28795
|
registerGuardrailCommands(program);
|
|
28305
28796
|
registerModelCommands(program);
|
|
28306
28797
|
registerDebugCommand(program);
|
|
28798
|
+
configureAgentTelemetry(program);
|
|
28307
28799
|
};
|
|
28308
28800
|
|
|
28309
28801
|
export { metadata2, registerCommands2 };
|
|
28310
28802
|
|
|
28311
|
-
//# debugId=
|
|
28803
|
+
//# debugId=B01942D7213DB45B64756E2164756E21
|