@uipath/agent-tool 1.200.0-preview.109 → 1.201.0-preview.115
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/{agent-project-service-j3sst5cf.js → agent-project-service-wyh0r5cb.js} +3 -3
- package/dist/agent-tool-OK5DK57D-mxt5stp9.js +12 -0
- package/dist/{browser-strategy-v4n9zxyf.js → browser-strategy-16yagjhr.js} +1 -1
- package/dist/executor-tool.js +296 -0
- package/dist/{index-b13x0rpx.js → index-3pq4x5b7.js} +12 -9
- package/dist/index-9f8q2ege.js +2058 -0
- package/dist/{packager-tool-mf36zc9b.js → index-hsadteg4.js} +41 -253
- package/dist/{index-p0nmgr54.js → index-p052hv12.js} +5 -5
- package/dist/{index-08fsnqg0.js → index-rqfxg3fq.js} +1 -1
- package/dist/index.js +14 -12
- package/dist/{integration-tool-service-z414k85p.js → integration-tool-service-dgk5br9n.js} +4 -4
- package/dist/{is-client-m0srzs8p.js → is-client-7pyb4pet.js} +3 -3
- package/dist/js-yaml-cggj6w7q.js +3145 -0
- package/dist/{packager-tool-jmzese1s.js → node-strategy-1r3qegaf.js} +62 -32
- package/dist/packager-tool-4fge2k9c.js +419 -0
- package/dist/{packager-tool-9tv93r4w.js → packager-tool-b098y4a2.js} +2 -418
- package/dist/{packager-tool-dcazs5r7.js → packager-tool-expj850v.js} +6 -4
- package/dist/{packager-tool-fzq5y98q.js → packager-tool-ftfbnjpc.js} +2 -2
- package/dist/{packager-tool-yet9qmnt.js → packager-tool-fz1pzt1z.js} +93 -21
- package/dist/{packager-tool-wfbw3w4y.js → packager-tool-hxd8e3e6.js} +120 -5152
- package/dist/{packager-tool-1snc64g4.js → packager-tool-q42rrs00.js} +3 -2
- package/dist/packager-tool-qa9gftnj.js +31 -0
- package/dist/packager-tool-rev4tnf6.js +8340 -0
- package/dist/{packager-tool-k0e3bv7y.js → packager-tool-ty88v0fy.js} +5 -5
- package/dist/{packager-tool-wywyn3hw.js → packager-tool-xz142g61.js} +807 -8956
- package/dist/packager-tool-yv3rvyas.js +239 -0
- package/dist/packager-tool.js +5 -4
- package/dist/tool.js +14 -12
- package/package.json +4 -3
- package/dist/agent-tool-OK5DK57D-8nt05j7t.js +0 -11
- package/dist/node-strategy-cvesesna.js +0 -65
|
@@ -1,419 +1,3 @@
|
|
|
1
|
-
// ../../node_modules/@uipath/tool-agent/dist/chunk-UWHPEJIJ.js
|
|
2
|
-
var BindingsConstants = {
|
|
3
|
-
ProcessResource: "process",
|
|
4
|
-
ConnectionResource: "connection",
|
|
5
|
-
IndexResource: "index",
|
|
6
|
-
McpResource: "mcpServer",
|
|
7
|
-
MemorySpaceResource: "memorySpace",
|
|
8
|
-
AppResource: "app",
|
|
9
|
-
AssetResource: "asset",
|
|
10
|
-
BucketResource: "bucket",
|
|
11
|
-
IxpResource: "ixp",
|
|
12
|
-
DataFabricEntityResource: "entity",
|
|
13
|
-
RemoteA2aAgentResource: "remoteA2aAgent",
|
|
14
|
-
VsEscalationType: 1,
|
|
15
|
-
BindingsModelVersion: "2.0",
|
|
16
|
-
BindingsValueNameKey: "name",
|
|
17
|
-
BindingsValueVersionKey: "version",
|
|
18
|
-
BindingsValueConnectionIdKey: "connectionId",
|
|
19
|
-
BindingsValueProcessNameDisplayName: "Process name",
|
|
20
|
-
BindingsValueConnectionIdDisplayName: "Connection ID",
|
|
21
|
-
BindingsValueByomConnectionIdDisplayName: "Model connection ID",
|
|
22
|
-
BindingsValueIndexNameDisplayName: "Index Name",
|
|
23
|
-
BindingsValueSlugDisplayName: "Slug",
|
|
24
|
-
BindingsValueMemoryNameDisplayName: "Memory name",
|
|
25
|
-
BindingsValueAppNameDisplayName: "App name",
|
|
26
|
-
BindingsValueAssetNameDisplayName: "Asset Name",
|
|
27
|
-
BindingsValueBucketNameDisplayName: "Storage Bucket Name",
|
|
28
|
-
BindingsValueIxpProjectNameDisplayName: "IXP project name",
|
|
29
|
-
BindingsValueIxpProjectVersionDisplayName: "IXP project version",
|
|
30
|
-
BindingsValueDataFabricEntityNameDisplayName: "Entity name",
|
|
31
|
-
BindingsValueFolderPathKey: "folderPath",
|
|
32
|
-
BindingsValueFolderPathDisplayName: "Folder path",
|
|
33
|
-
BindingsMetadataSubTypeKey: "subType",
|
|
34
|
-
BindingsMetadataConnectorKey: "connector",
|
|
35
|
-
BindingsMetadataUseConnectionServiceKey: "useConnectionService",
|
|
36
|
-
BindingsMetadataVersionKey: "bindingsVersion",
|
|
37
|
-
BindingsMetadataSolutionsSupport: "solutionsSupport",
|
|
38
|
-
BindingsMetadataAgentSubType: "agent",
|
|
39
|
-
BindingsMetadataProcessSubType: "process",
|
|
40
|
-
BindingsMetadataApiWorkflowSubType: "api",
|
|
41
|
-
BindingsMetadataAgenticProcessSubType: "processOrchestration",
|
|
42
|
-
BindingsMetadataFlowSubType: "flow",
|
|
43
|
-
BindingsMetadataFunctionSubType: "function",
|
|
44
|
-
BindingsMetadataVersion: "2.2",
|
|
45
|
-
BindingsMetadataTrue: "true"
|
|
46
|
-
};
|
|
47
|
-
var ASSET_RECIPIENT_TYPES = /* @__PURE__ */ new Set([4, 6]);
|
|
48
|
-
var SOLUTION_FOLDER_SENTINEL = "solution_folder";
|
|
49
|
-
function isAssetRecipientType(type) {
|
|
50
|
-
return ASSET_RECIPIENT_TYPES.has(type);
|
|
51
|
-
}
|
|
52
|
-
function createBindingValue(defaultValue, displayName) {
|
|
53
|
-
return { defaultValue, isExpression: false, displayName };
|
|
54
|
-
}
|
|
55
|
-
function defaultMetadata() {
|
|
56
|
-
return {
|
|
57
|
-
[BindingsConstants.BindingsMetadataVersionKey]: BindingsConstants.BindingsMetadataVersion,
|
|
58
|
-
[BindingsConstants.BindingsMetadataSolutionsSupport]: BindingsConstants.BindingsMetadataTrue
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function resolveFolderPathBindingValue(raw) {
|
|
62
|
-
if (!raw || raw === SOLUTION_FOLDER_SENTINEL)
|
|
63
|
-
return;
|
|
64
|
-
return raw;
|
|
65
|
-
}
|
|
66
|
-
function addFolderPathToValue(value, raw) {
|
|
67
|
-
const resolved = resolveFolderPathBindingValue(raw);
|
|
68
|
-
if (resolved === undefined)
|
|
69
|
-
return;
|
|
70
|
-
value[BindingsConstants.BindingsValueFolderPathKey] = createBindingValue(resolved, BindingsConstants.BindingsValueFolderPathDisplayName);
|
|
71
|
-
}
|
|
72
|
-
function createProcessBinding(processName, subType, rawFolderPath) {
|
|
73
|
-
const value = {
|
|
74
|
-
[BindingsConstants.BindingsValueNameKey]: createBindingValue(processName, BindingsConstants.BindingsValueProcessNameDisplayName)
|
|
75
|
-
};
|
|
76
|
-
addFolderPathToValue(value, rawFolderPath);
|
|
77
|
-
return {
|
|
78
|
-
resource: BindingsConstants.ProcessResource,
|
|
79
|
-
key: processName,
|
|
80
|
-
value,
|
|
81
|
-
metadata: {
|
|
82
|
-
[BindingsConstants.BindingsMetadataSubTypeKey]: subType,
|
|
83
|
-
...defaultMetadata()
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
function createConnectionBinding(connectionId, connectorKey, displayName) {
|
|
88
|
-
return {
|
|
89
|
-
resource: BindingsConstants.ConnectionResource,
|
|
90
|
-
key: connectionId,
|
|
91
|
-
value: {
|
|
92
|
-
[BindingsConstants.BindingsValueConnectionIdKey]: createBindingValue(connectionId, displayName)
|
|
93
|
-
},
|
|
94
|
-
metadata: {
|
|
95
|
-
[BindingsConstants.BindingsMetadataConnectorKey]: connectorKey,
|
|
96
|
-
[BindingsConstants.BindingsMetadataUseConnectionServiceKey]: BindingsConstants.BindingsMetadataTrue,
|
|
97
|
-
...defaultMetadata()
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
function createIndexBinding(indexName, rawFolderPath) {
|
|
102
|
-
const value = {
|
|
103
|
-
[BindingsConstants.BindingsValueNameKey]: createBindingValue(indexName, BindingsConstants.BindingsValueIndexNameDisplayName)
|
|
104
|
-
};
|
|
105
|
-
addFolderPathToValue(value, rawFolderPath);
|
|
106
|
-
return {
|
|
107
|
-
resource: BindingsConstants.IndexResource,
|
|
108
|
-
key: indexName,
|
|
109
|
-
value,
|
|
110
|
-
metadata: defaultMetadata()
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
function createAppBinding(appName, rawFolderPath) {
|
|
114
|
-
const value = {
|
|
115
|
-
[BindingsConstants.BindingsValueNameKey]: createBindingValue(appName, BindingsConstants.BindingsValueAppNameDisplayName)
|
|
116
|
-
};
|
|
117
|
-
addFolderPathToValue(value, rawFolderPath);
|
|
118
|
-
return {
|
|
119
|
-
resource: BindingsConstants.AppResource,
|
|
120
|
-
key: appName,
|
|
121
|
-
value,
|
|
122
|
-
metadata: defaultMetadata()
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
function createAssetBinding(assetName, rawFolderPath) {
|
|
126
|
-
const value = {
|
|
127
|
-
[BindingsConstants.BindingsValueNameKey]: createBindingValue(assetName, BindingsConstants.BindingsValueAssetNameDisplayName)
|
|
128
|
-
};
|
|
129
|
-
addFolderPathToValue(value, rawFolderPath);
|
|
130
|
-
return {
|
|
131
|
-
resource: BindingsConstants.AssetResource,
|
|
132
|
-
key: assetName,
|
|
133
|
-
value,
|
|
134
|
-
metadata: defaultMetadata()
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function createBucketBinding(bucketName, rawFolderPath) {
|
|
138
|
-
const value = {
|
|
139
|
-
[BindingsConstants.BindingsValueNameKey]: createBindingValue(bucketName, BindingsConstants.BindingsValueBucketNameDisplayName)
|
|
140
|
-
};
|
|
141
|
-
addFolderPathToValue(value, rawFolderPath);
|
|
142
|
-
return {
|
|
143
|
-
resource: BindingsConstants.BucketResource,
|
|
144
|
-
key: bucketName,
|
|
145
|
-
value,
|
|
146
|
-
metadata: defaultMetadata()
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
function generateAgentSettingsBindings(agent) {
|
|
150
|
-
if (agent.type !== "lowCode")
|
|
151
|
-
return [];
|
|
152
|
-
const byom = agent.settings.byomProperties;
|
|
153
|
-
if (!byom)
|
|
154
|
-
return [];
|
|
155
|
-
return [
|
|
156
|
-
createConnectionBinding(byom.connectionId, byom.connectorKey, BindingsConstants.BindingsValueByomConnectionIdDisplayName)
|
|
157
|
-
];
|
|
158
|
-
}
|
|
159
|
-
function generateAgentGuardrailBindings(agent) {
|
|
160
|
-
if (agent.type !== "lowCode" || !agent.guardrails)
|
|
161
|
-
return [];
|
|
162
|
-
const bindings = [];
|
|
163
|
-
for (const guardrail of agent.guardrails) {
|
|
164
|
-
if (guardrail.action?.$actionType === "escalate") {
|
|
165
|
-
const { action } = guardrail;
|
|
166
|
-
const appName = action.app?.name;
|
|
167
|
-
if (appName) {
|
|
168
|
-
bindings.push(createAppBinding(appName, action.app?.folderName));
|
|
169
|
-
}
|
|
170
|
-
const recipient = action.recipient;
|
|
171
|
-
if (recipient && isAssetRecipientType(recipient.type) && "assetName" in recipient && recipient.assetName) {
|
|
172
|
-
bindings.push(createAssetBinding(recipient.assetName, "folderPath" in recipient ? recipient.folderPath : undefined));
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
return bindings;
|
|
177
|
-
}
|
|
178
|
-
function generateAgentBindings(agent) {
|
|
179
|
-
return [...generateAgentSettingsBindings(agent), ...generateAgentGuardrailBindings(agent)];
|
|
180
|
-
}
|
|
181
|
-
function generateFeatureBindings(feature) {
|
|
182
|
-
if (feature.$featureType === "memorySpace") {
|
|
183
|
-
const value = {
|
|
184
|
-
[BindingsConstants.BindingsValueNameKey]: createBindingValue(feature.memorySpaceName, BindingsConstants.BindingsValueMemoryNameDisplayName)
|
|
185
|
-
};
|
|
186
|
-
addFolderPathToValue(value, feature.folderPath);
|
|
187
|
-
return [
|
|
188
|
-
{
|
|
189
|
-
resource: BindingsConstants.MemorySpaceResource,
|
|
190
|
-
key: feature.memorySpaceName,
|
|
191
|
-
value,
|
|
192
|
-
metadata: defaultMetadata()
|
|
193
|
-
}
|
|
194
|
-
];
|
|
195
|
-
}
|
|
196
|
-
return [];
|
|
197
|
-
}
|
|
198
|
-
function createProcessToolBinding(tool, subType) {
|
|
199
|
-
return [createProcessBinding(tool.properties.processName, subType, tool.properties.folderPath)];
|
|
200
|
-
}
|
|
201
|
-
function createIntegrationToolBindings(tool) {
|
|
202
|
-
return [
|
|
203
|
-
createConnectionBinding(tool.properties.connection.id, tool.properties.connection.connector.key, BindingsConstants.BindingsValueConnectionIdDisplayName)
|
|
204
|
-
];
|
|
205
|
-
}
|
|
206
|
-
function createIxpToolBindings(tool) {
|
|
207
|
-
return [
|
|
208
|
-
{
|
|
209
|
-
resource: BindingsConstants.IxpResource,
|
|
210
|
-
key: tool.properties.projectName,
|
|
211
|
-
value: {
|
|
212
|
-
[BindingsConstants.BindingsValueNameKey]: createBindingValue(tool.properties.projectName, BindingsConstants.BindingsValueIxpProjectNameDisplayName),
|
|
213
|
-
[BindingsConstants.BindingsValueVersionKey]: createBindingValue(tool.properties.versionTag, BindingsConstants.BindingsValueIxpProjectVersionDisplayName)
|
|
214
|
-
},
|
|
215
|
-
metadata: {
|
|
216
|
-
[BindingsConstants.BindingsMetadataVersionKey]: BindingsConstants.BindingsMetadataVersion
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
];
|
|
220
|
-
}
|
|
221
|
-
var DEFAULT_TOOL_BINDING_HANDLER_REGISTRY = {
|
|
222
|
-
process: (tool) => createProcessToolBinding(tool, BindingsConstants.BindingsMetadataProcessSubType),
|
|
223
|
-
agent: (tool) => createProcessToolBinding(tool, BindingsConstants.BindingsMetadataAgentSubType),
|
|
224
|
-
api: (tool) => createProcessToolBinding(tool, BindingsConstants.BindingsMetadataApiWorkflowSubType),
|
|
225
|
-
processOrchestration: (tool) => createProcessToolBinding(tool, BindingsConstants.BindingsMetadataAgenticProcessSubType),
|
|
226
|
-
flow: (tool) => createProcessToolBinding(tool, BindingsConstants.BindingsMetadataFlowSubType),
|
|
227
|
-
function: (tool) => createProcessToolBinding(tool, BindingsConstants.BindingsMetadataFunctionSubType),
|
|
228
|
-
integration: createIntegrationToolBindings,
|
|
229
|
-
ixp: createIxpToolBindings
|
|
230
|
-
};
|
|
231
|
-
function deepRagIndexName(tool) {
|
|
232
|
-
if (tool.type !== "internal")
|
|
233
|
-
return;
|
|
234
|
-
if (tool.properties.toolType !== "deep-rag")
|
|
235
|
-
return;
|
|
236
|
-
const { settings } = tool.properties;
|
|
237
|
-
if (!("indexName" in settings) || typeof settings.indexName !== "string" || settings.indexName.length === 0) {
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
return settings.indexName;
|
|
241
|
-
}
|
|
242
|
-
function generateFallbackToolBindings(tool) {
|
|
243
|
-
const indexName = deepRagIndexName(tool);
|
|
244
|
-
if (indexName) {
|
|
245
|
-
return [createIndexBinding(indexName)];
|
|
246
|
-
}
|
|
247
|
-
return [];
|
|
248
|
-
}
|
|
249
|
-
function unhandledBindingsType(_value) {
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
function resolveToolBindingsFromRegistry(tool, registry) {
|
|
253
|
-
switch (tool.type) {
|
|
254
|
-
case "process":
|
|
255
|
-
return registry.process?.(tool);
|
|
256
|
-
case "agent":
|
|
257
|
-
return registry.agent?.(tool);
|
|
258
|
-
case "api":
|
|
259
|
-
return registry.api?.(tool);
|
|
260
|
-
case "processOrchestration":
|
|
261
|
-
return registry.processOrchestration?.(tool);
|
|
262
|
-
case "flow":
|
|
263
|
-
return registry.flow?.(tool);
|
|
264
|
-
case "function":
|
|
265
|
-
return registry.function?.(tool);
|
|
266
|
-
case "integration":
|
|
267
|
-
return registry.integration?.(tool);
|
|
268
|
-
case "ixp":
|
|
269
|
-
return registry.ixp?.(tool);
|
|
270
|
-
case "internal":
|
|
271
|
-
return;
|
|
272
|
-
case "clientSide":
|
|
273
|
-
return registry.clientSide?.(tool);
|
|
274
|
-
default:
|
|
275
|
-
return unhandledBindingsType(tool);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
function generateToolBindings(tool, registry = DEFAULT_TOOL_BINDING_HANDLER_REGISTRY) {
|
|
279
|
-
const bindings = resolveToolBindingsFromRegistry(tool, registry) ?? generateFallbackToolBindings(tool);
|
|
280
|
-
if (tool.guardrail?.policies) {
|
|
281
|
-
for (const policy of tool.guardrail.policies) {
|
|
282
|
-
if (policy.action?.$actionType === "escalate" && policy.action.app?.name) {
|
|
283
|
-
bindings.push(createAppBinding(policy.action.app.name, policy.action.app.folderName));
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
return bindings;
|
|
288
|
-
}
|
|
289
|
-
function generateDataFabricEntitySetBindings(context) {
|
|
290
|
-
if (context.entitySet.length === 0) {
|
|
291
|
-
return [];
|
|
292
|
-
}
|
|
293
|
-
return context.entitySet.map((entity) => {
|
|
294
|
-
const value = {
|
|
295
|
-
[BindingsConstants.BindingsValueNameKey]: createBindingValue(entity.name, BindingsConstants.BindingsValueDataFabricEntityNameDisplayName)
|
|
296
|
-
};
|
|
297
|
-
addFolderPathToValue(value, entity.folderId);
|
|
298
|
-
return {
|
|
299
|
-
resource: BindingsConstants.DataFabricEntityResource,
|
|
300
|
-
key: entity.referenceKey ?? entity.id,
|
|
301
|
-
value,
|
|
302
|
-
metadata: {
|
|
303
|
-
...defaultMetadata(),
|
|
304
|
-
scope: "folder"
|
|
305
|
-
}
|
|
306
|
-
};
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
function generateContextBindings(context) {
|
|
310
|
-
if (context.contextType === "datafabricentityset") {
|
|
311
|
-
return generateDataFabricEntitySetBindings(context);
|
|
312
|
-
}
|
|
313
|
-
return [createIndexBinding(context.indexName, context.folderPath)];
|
|
314
|
-
}
|
|
315
|
-
function generateEscalationBindings(escalation) {
|
|
316
|
-
const bindings = [];
|
|
317
|
-
if (escalation.escalationType === BindingsConstants.VsEscalationType) {
|
|
318
|
-
const bucketName = escalation.vsEscalationProperties?.storageBucketName;
|
|
319
|
-
if (bucketName) {
|
|
320
|
-
bindings.push(createBucketBinding(bucketName, escalation.vsEscalationProperties?.storageBucketFolderPath));
|
|
321
|
-
}
|
|
322
|
-
} else {
|
|
323
|
-
for (const channel of escalation.channels ?? []) {
|
|
324
|
-
if (channel.type === "actionCenter") {
|
|
325
|
-
const appName = channel.properties?.appName;
|
|
326
|
-
if (appName) {
|
|
327
|
-
bindings.push(createAppBinding(appName, channel.properties?.folderName));
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
for (const recipient of channel.recipients ?? []) {
|
|
331
|
-
if (isAssetRecipientType(recipient.type) && "assetName" in recipient && recipient.assetName) {
|
|
332
|
-
bindings.push(createAssetBinding(recipient.assetName, "folderPath" in recipient ? recipient.folderPath : undefined));
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
return bindings;
|
|
338
|
-
}
|
|
339
|
-
function generateMcpBindings(mcp) {
|
|
340
|
-
const value = {
|
|
341
|
-
[BindingsConstants.BindingsValueNameKey]: createBindingValue(mcp.slug, BindingsConstants.BindingsValueSlugDisplayName)
|
|
342
|
-
};
|
|
343
|
-
addFolderPathToValue(value, mcp.folderPath);
|
|
344
|
-
return [
|
|
345
|
-
{
|
|
346
|
-
resource: BindingsConstants.McpResource,
|
|
347
|
-
key: mcp.slug,
|
|
348
|
-
value,
|
|
349
|
-
metadata: defaultMetadata()
|
|
350
|
-
}
|
|
351
|
-
];
|
|
352
|
-
}
|
|
353
|
-
function generateA2aBindings(a2a) {
|
|
354
|
-
const value = {
|
|
355
|
-
[BindingsConstants.BindingsValueNameKey]: createBindingValue(a2a.slug, BindingsConstants.BindingsValueSlugDisplayName)
|
|
356
|
-
};
|
|
357
|
-
addFolderPathToValue(value, a2a.folderPath);
|
|
358
|
-
return [
|
|
359
|
-
{
|
|
360
|
-
resource: BindingsConstants.RemoteA2aAgentResource,
|
|
361
|
-
key: a2a.slug,
|
|
362
|
-
value,
|
|
363
|
-
metadata: defaultMetadata()
|
|
364
|
-
}
|
|
365
|
-
];
|
|
366
|
-
}
|
|
367
|
-
var DEFAULT_RESOURCE_BINDING_HANDLER_REGISTRY = {
|
|
368
|
-
tool: (resource) => generateToolBindings(resource),
|
|
369
|
-
context: (resource) => generateContextBindings(resource),
|
|
370
|
-
escalation: (resource) => generateEscalationBindings(resource),
|
|
371
|
-
mcp: (resource) => generateMcpBindings(resource),
|
|
372
|
-
a2a: (resource) => generateA2aBindings(resource)
|
|
373
|
-
};
|
|
374
|
-
function resolveResourceBindingsFromRegistry(resource, registry) {
|
|
375
|
-
switch (resource.$resourceType) {
|
|
376
|
-
case "tool":
|
|
377
|
-
return registry.tool?.(resource);
|
|
378
|
-
case "context":
|
|
379
|
-
return registry.context?.(resource);
|
|
380
|
-
case "escalation":
|
|
381
|
-
return registry.escalation?.(resource);
|
|
382
|
-
case "mcp":
|
|
383
|
-
return registry.mcp?.(resource);
|
|
384
|
-
case "a2a":
|
|
385
|
-
return registry.a2a?.(resource);
|
|
386
|
-
default:
|
|
387
|
-
return unhandledBindingsType(resource);
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
function generateResourceBindings(resource, registry = DEFAULT_RESOURCE_BINDING_HANDLER_REGISTRY) {
|
|
391
|
-
return resolveResourceBindingsFromRegistry(resource, registry) ?? [];
|
|
392
|
-
}
|
|
393
|
-
function generateBindings(agent, resources, features) {
|
|
394
|
-
const allBindings = [];
|
|
395
|
-
for (const resource of resources) {
|
|
396
|
-
allBindings.push(...generateResourceBindings(resource));
|
|
397
|
-
}
|
|
398
|
-
for (const feature of features) {
|
|
399
|
-
allBindings.push(...generateFeatureBindings(feature));
|
|
400
|
-
}
|
|
401
|
-
allBindings.push(...generateAgentBindings(agent));
|
|
402
|
-
const seen = /* @__PURE__ */ new Set;
|
|
403
|
-
const uniqueBindings = [];
|
|
404
|
-
for (const binding of allBindings) {
|
|
405
|
-
const key = `${binding.resource}_${binding.key}`;
|
|
406
|
-
if (!seen.has(key)) {
|
|
407
|
-
seen.add(key);
|
|
408
|
-
uniqueBindings.push(binding);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
return {
|
|
412
|
-
version: BindingsConstants.BindingsModelVersion,
|
|
413
|
-
resources: uniqueBindings
|
|
414
|
-
};
|
|
415
|
-
}
|
|
416
|
-
|
|
417
1
|
// ../../node_modules/fflate/esm/index.mjs
|
|
418
2
|
import { createRequire } from "module";
|
|
419
3
|
var require2 = createRequire("/");
|
|
@@ -1057,6 +641,6 @@ function zipSync(data, opts) {
|
|
|
1057
641
|
return out;
|
|
1058
642
|
}
|
|
1059
643
|
|
|
1060
|
-
export { zipSync
|
|
644
|
+
export { zipSync };
|
|
1061
645
|
|
|
1062
|
-
//# debugId=
|
|
646
|
+
//# debugId=9B62AE9587D4B1F764756E2164756E21
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
generateBindings
|
|
3
|
-
|
|
4
|
-
} from "./packager-tool-9tv93r4w.js";
|
|
2
|
+
generateBindings
|
|
3
|
+
} from "./packager-tool-4fge2k9c.js";
|
|
5
4
|
import {
|
|
6
5
|
applyMigrations,
|
|
7
6
|
currentAgentStorageSchema,
|
|
@@ -12,6 +11,9 @@ import {
|
|
|
12
11
|
migrations,
|
|
13
12
|
require_semver
|
|
14
13
|
} from "./packager-tool-zwztyzps.js";
|
|
14
|
+
import {
|
|
15
|
+
zipSync
|
|
16
|
+
} from "./packager-tool-b098y4a2.js";
|
|
15
17
|
import {
|
|
16
18
|
__export,
|
|
17
19
|
__toESM
|
|
@@ -12891,4 +12893,4 @@ var AgentTool = class extends ProjectTool {
|
|
|
12891
12893
|
|
|
12892
12894
|
export { ProjectTypes, toolsFactoryRepository, AgentTool };
|
|
12893
12895
|
|
|
12894
|
-
//# debugId=
|
|
12896
|
+
//# debugId=55BB1293F8A7573E64756E2164756E21
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OutputFormatter,
|
|
3
3
|
catchError
|
|
4
|
-
} from "./packager-tool-
|
|
4
|
+
} from "./packager-tool-hxd8e3e6.js";
|
|
5
5
|
import {
|
|
6
6
|
getFileSystem
|
|
7
|
-
} from "./packager-tool-
|
|
7
|
+
} from "./packager-tool-yv3rvyas.js";
|
|
8
8
|
|
|
9
9
|
// src/services/agent-builder-migrations.ts
|
|
10
10
|
var warnedLegacyToolGuardrailPolicies = false;
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
} from "./packager-tool-0gctz400.js";
|
|
5
5
|
import {
|
|
6
6
|
catchError
|
|
7
|
-
} from "./packager-tool-
|
|
7
|
+
} from "./packager-tool-qa9gftnj.js";
|
|
8
8
|
import {
|
|
9
9
|
getFileSystem
|
|
10
|
-
} from "./packager-tool-
|
|
10
|
+
} from "./packager-tool-yv3rvyas.js";
|
|
11
11
|
import {
|
|
12
12
|
AUTH_FILENAME,
|
|
13
13
|
DEFAULT_BASE_URL,
|
|
14
14
|
DEFAULT_REDIRECT_URI,
|
|
15
15
|
UIPATH_HOME_DIR
|
|
16
|
-
} from "./packager-tool-
|
|
16
|
+
} from "./packager-tool-q42rrs00.js";
|
|
17
17
|
import {
|
|
18
18
|
__require
|
|
19
19
|
} from "./packager-tool-wckvcay0.js";
|
|
@@ -913,6 +913,67 @@ var getTokenExpiration = (accessToken) => {
|
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
915
|
|
|
916
|
+
// ../auth/src/sessionIdentity.ts
|
|
917
|
+
var parseAuthFlow = (value) => value === "authorization_code" || value === "client_credentials" || value === "federated_credentials" ? value : undefined;
|
|
918
|
+
var decodeClaims = (accessToken) => {
|
|
919
|
+
const [error, claims] = catchError(() => parseJWT(accessToken));
|
|
920
|
+
return error ? undefined : claims;
|
|
921
|
+
};
|
|
922
|
+
var asString = (value) => typeof value === "string" && value.length > 0 ? value : undefined;
|
|
923
|
+
var resolveIdentityType = (claims, authFlow, email) => {
|
|
924
|
+
const subType = asString(claims?.sub_type);
|
|
925
|
+
if (subType) {
|
|
926
|
+
return subType.startsWith("service") ? "Application" : "User";
|
|
927
|
+
}
|
|
928
|
+
if (authFlow) {
|
|
929
|
+
return authFlow === "authorization_code" ? "User" : "Application";
|
|
930
|
+
}
|
|
931
|
+
if (email)
|
|
932
|
+
return "User";
|
|
933
|
+
if (asString(claims?.client_id) && !asString(claims?.sub)) {
|
|
934
|
+
return "Application";
|
|
935
|
+
}
|
|
936
|
+
return;
|
|
937
|
+
};
|
|
938
|
+
var looksLikeEmail = (value) => value?.includes("@") ?? false;
|
|
939
|
+
var pickEmail = (claims) => {
|
|
940
|
+
for (const candidate of [claims?.email, claims?.preferred_username]) {
|
|
941
|
+
const value = asString(candidate);
|
|
942
|
+
if (looksLikeEmail(value))
|
|
943
|
+
return value;
|
|
944
|
+
}
|
|
945
|
+
return;
|
|
946
|
+
};
|
|
947
|
+
var pickName = (claims) => {
|
|
948
|
+
const username = asString(claims?.preferred_username);
|
|
949
|
+
return asString(claims?.name) ?? (looksLikeEmail(username) ? undefined : username);
|
|
950
|
+
};
|
|
951
|
+
var resolveSessionIdentity = (accessToken, authFlow) => {
|
|
952
|
+
const claims = accessToken ? decodeClaims(accessToken) : undefined;
|
|
953
|
+
const email = pickEmail(claims);
|
|
954
|
+
const type = resolveIdentityType(claims, authFlow, email);
|
|
955
|
+
if (!type)
|
|
956
|
+
return;
|
|
957
|
+
const identity = { type };
|
|
958
|
+
if (authFlow)
|
|
959
|
+
identity.authFlow = authFlow;
|
|
960
|
+
if (type === "User") {
|
|
961
|
+
const userId = asString(claims?.sub);
|
|
962
|
+
if (userId)
|
|
963
|
+
identity.userId = userId;
|
|
964
|
+
if (email)
|
|
965
|
+
identity.userEmail = email;
|
|
966
|
+
const name = pickName(claims);
|
|
967
|
+
if (name)
|
|
968
|
+
identity.userName = name;
|
|
969
|
+
return identity;
|
|
970
|
+
}
|
|
971
|
+
const clientId = asString(claims?.client_id);
|
|
972
|
+
if (clientId)
|
|
973
|
+
identity.clientId = clientId;
|
|
974
|
+
return identity;
|
|
975
|
+
};
|
|
976
|
+
|
|
916
977
|
// ../auth/src/envAuth.ts
|
|
917
978
|
var ENV_AUTH_ENABLE_VAR = "UIPATH_CLI_ENABLE_ENV_AUTH";
|
|
918
979
|
var ENFORCE_ROBOT_AUTH_VAR = "UIPATH_CLI_ENFORCE_ROBOT_AUTH";
|
|
@@ -962,6 +1023,7 @@ var readAuthFromEnv = () => {
|
|
|
962
1023
|
}
|
|
963
1024
|
const expiration = getTokenExpiration(accessToken);
|
|
964
1025
|
const loginStatus = expiration && expiration <= new Date ? "Expired" : "Logged in";
|
|
1026
|
+
const identity = resolveSessionIdentity(accessToken);
|
|
965
1027
|
return {
|
|
966
1028
|
loginStatus,
|
|
967
1029
|
accessToken,
|
|
@@ -971,7 +1033,8 @@ var readAuthFromEnv = () => {
|
|
|
971
1033
|
tenantName,
|
|
972
1034
|
tenantId,
|
|
973
1035
|
expiration,
|
|
974
|
-
source: "env" /*
|
|
1036
|
+
source: "env-vars" /* EnvironmentVariables */,
|
|
1037
|
+
...identity ? { identity } : {}
|
|
975
1038
|
};
|
|
976
1039
|
};
|
|
977
1040
|
|
|
@@ -1225,6 +1288,9 @@ var refreshAccessToken = async ({
|
|
|
1225
1288
|
return { accessToken: newAccessToken, refreshToken: newRefreshToken };
|
|
1226
1289
|
};
|
|
1227
1290
|
|
|
1291
|
+
// ../auth/src/types.ts
|
|
1292
|
+
var AUTH_FLOW_ENV_VAR = "UIPATH_AUTH_FLOW";
|
|
1293
|
+
|
|
1228
1294
|
// ../auth/src/utils/envFile.ts
|
|
1229
1295
|
var DEFAULT_AUTH_FILENAME = AUTH_FILENAME;
|
|
1230
1296
|
var DEFAULT_ENV_FILENAME = `${UIPATH_HOME_DIR}/${AUTH_FILENAME}`;
|
|
@@ -1386,12 +1452,12 @@ var saveEnvFileAsync = async ({
|
|
|
1386
1452
|
};
|
|
1387
1453
|
|
|
1388
1454
|
// ../auth/src/loginStatus.ts
|
|
1389
|
-
var
|
|
1390
|
-
((
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
})(
|
|
1455
|
+
var CredentialSource;
|
|
1456
|
+
((CredentialSource2) => {
|
|
1457
|
+
CredentialSource2["SavedLogin"] = "saved-login";
|
|
1458
|
+
CredentialSource2["Robot"] = "robot";
|
|
1459
|
+
CredentialSource2["EnvironmentVariables"] = "env-vars";
|
|
1460
|
+
})(CredentialSource ||= {});
|
|
1395
1461
|
var getLoginStatusAsync = async (options = {}) => {
|
|
1396
1462
|
return getLoginStatusWithDeps(options);
|
|
1397
1463
|
};
|
|
@@ -1597,7 +1663,8 @@ async function buildFileStatus(tokens, credentials, globalHint) {
|
|
|
1597
1663
|
tenantName: credentials.UIPATH_TENANT_NAME,
|
|
1598
1664
|
tenantId: credentials.UIPATH_TENANT_ID,
|
|
1599
1665
|
expiration: tokens.expiration,
|
|
1600
|
-
source: "
|
|
1666
|
+
source: "saved-login" /* SavedLogin */,
|
|
1667
|
+
...identityFields(tokens.accessToken, credentials),
|
|
1601
1668
|
...tokens.persistenceWarning ? { hint: tokens.persistenceWarning, persistenceFailed: true } : {},
|
|
1602
1669
|
...tokens.lockReleaseFailed ? { lockReleaseFailed: true } : {},
|
|
1603
1670
|
...tokens.tokenRefresh ? { tokenRefresh: tokens.tokenRefresh } : {}
|
|
@@ -1610,7 +1677,12 @@ async function buildFileStatus(tokens, credentials, globalHint) {
|
|
|
1610
1677
|
}
|
|
1611
1678
|
return result;
|
|
1612
1679
|
}
|
|
1680
|
+
function identityFields(accessToken, credentials) {
|
|
1681
|
+
const identity = resolveSessionIdentity(accessToken, parseAuthFlow(credentials[AUTH_FLOW_ENV_VAR]));
|
|
1682
|
+
return identity ? { identity } : {};
|
|
1683
|
+
}
|
|
1613
1684
|
function buildRobotStatus(robotCreds) {
|
|
1685
|
+
const identity = resolveSessionIdentity(robotCreds.accessToken);
|
|
1614
1686
|
return {
|
|
1615
1687
|
loginStatus: "Logged in",
|
|
1616
1688
|
accessToken: robotCreds.accessToken,
|
|
@@ -1621,7 +1693,8 @@ function buildRobotStatus(robotCreds) {
|
|
|
1621
1693
|
tenantId: robotCreds.tenantId,
|
|
1622
1694
|
issuer: robotCreds.issuer,
|
|
1623
1695
|
expiration: getTokenExpiration(robotCreds.accessToken),
|
|
1624
|
-
source: "robot" /* Robot
|
|
1696
|
+
source: "robot" /* Robot */,
|
|
1697
|
+
...identity ? { identity } : {}
|
|
1625
1698
|
};
|
|
1626
1699
|
}
|
|
1627
1700
|
var isFileNotFoundError = (error) => {
|
|
@@ -1672,7 +1745,8 @@ async function circuitBreakerShortCircuit(ctx) {
|
|
|
1672
1745
|
tenantName: credentials.UIPATH_TENANT_NAME,
|
|
1673
1746
|
tenantId: credentials.UIPATH_TENANT_ID,
|
|
1674
1747
|
expiration,
|
|
1675
|
-
source: "
|
|
1748
|
+
source: "saved-login" /* SavedLogin */,
|
|
1749
|
+
...identityFields(accessToken, credentials)
|
|
1676
1750
|
} : {},
|
|
1677
1751
|
hint: globalHint ?? (tokenIsDead ? deadHint : backoffHint),
|
|
1678
1752
|
refreshCircuitOpen: true,
|
|
@@ -1694,7 +1768,8 @@ async function lockAcquireFailureStatus(ctx, error) {
|
|
|
1694
1768
|
tenantName: ctx.credentials.UIPATH_TENANT_NAME,
|
|
1695
1769
|
tenantId: ctx.credentials.UIPATH_TENANT_ID,
|
|
1696
1770
|
expiration: ctx.expiration,
|
|
1697
|
-
source: "
|
|
1771
|
+
source: "saved-login" /* SavedLogin */,
|
|
1772
|
+
...identityFields(ctx.accessToken, ctx.credentials),
|
|
1698
1773
|
hint: globalHint,
|
|
1699
1774
|
tokenRefresh: {
|
|
1700
1775
|
attempted: false,
|
|
@@ -2181,9 +2256,6 @@ var selectTenantWithDeps = async (baseUrl, accessToken, organizationId, targetTe
|
|
|
2181
2256
|
return [selectedTenant.name, selectedTenant.id, organization.name];
|
|
2182
2257
|
};
|
|
2183
2258
|
|
|
2184
|
-
// ../auth/src/types.ts
|
|
2185
|
-
var AUTH_FLOW_ENV_VAR = "UIPATH_AUTH_FLOW";
|
|
2186
|
-
|
|
2187
2259
|
// ../auth/src/interactive.ts
|
|
2188
2260
|
var interactiveLoginWithDeps = async (options, deps) => {
|
|
2189
2261
|
const {
|
|
@@ -2460,10 +2532,10 @@ var authenticate = async ({
|
|
|
2460
2532
|
const authUrl = `${authorizationEndpoint}?${authParams.toString()}`;
|
|
2461
2533
|
let strategy;
|
|
2462
2534
|
if (isBrowser()) {
|
|
2463
|
-
const { BrowserAuthStrategy } = await import("./browser-strategy-
|
|
2535
|
+
const { BrowserAuthStrategy } = await import("./browser-strategy-16yagjhr.js");
|
|
2464
2536
|
strategy = new BrowserAuthStrategy;
|
|
2465
2537
|
} else {
|
|
2466
|
-
const { NodeAuthStrategy } = await import("./node-strategy-
|
|
2538
|
+
const { NodeAuthStrategy } = await import("./node-strategy-1r3qegaf.js");
|
|
2467
2539
|
strategy = new NodeAuthStrategy;
|
|
2468
2540
|
}
|
|
2469
2541
|
const code = await strategy.execute(authUrl, effectiveRedirectUriUrl, state, {
|
|
@@ -2482,6 +2554,6 @@ var authenticate = async ({
|
|
|
2482
2554
|
});
|
|
2483
2555
|
};
|
|
2484
2556
|
|
|
2485
|
-
export { setAuthFileConfig, InvalidBaseUrlError, DEFAULT_AUTH_PROFILE, AuthProfileValidationError, normalizeAuthProfileName, setActiveAuthProfile, clearActiveAuthProfile, getActiveAuthProfile, runWithAuthProfile, resolveAuthProfileFilePath, getActiveAuthProfileFilePath, parseJWT, ENV_AUTH_ENABLE_VAR, ENFORCE_ROBOT_AUTH_VAR, ENV_AUTH_VARS, EnvAuthConfigError, isEnvAuthEnabled, isRobotAuthEnforced, readAuthFromEnv, refreshTokenFingerprint, loadRefreshBreaker, saveRefreshBreaker, clearRefreshBreaker, registerRobotClientLoader, TokenRefreshOAuthError, isTokenRefreshOAuthFailure, refreshAccessToken, DEFAULT_AUTH_FILENAME, DEFAULT_ENV_FILENAME, resolveEnvFileLocationAsync, resolveEnvFilePathAsync, loadEnvFileAsync, saveEnvFileAsync,
|
|
2557
|
+
export { setAuthFileConfig, InvalidBaseUrlError, DEFAULT_AUTH_PROFILE, AuthProfileValidationError, normalizeAuthProfileName, setActiveAuthProfile, clearActiveAuthProfile, getActiveAuthProfile, runWithAuthProfile, resolveAuthProfileFilePath, getActiveAuthProfileFilePath, parseJWT, parseAuthFlow, resolveSessionIdentity, ENV_AUTH_ENABLE_VAR, ENFORCE_ROBOT_AUTH_VAR, ENV_AUTH_VARS, EnvAuthConfigError, isEnvAuthEnabled, isRobotAuthEnforced, readAuthFromEnv, refreshTokenFingerprint, loadRefreshBreaker, saveRefreshBreaker, clearRefreshBreaker, registerRobotClientLoader, TokenRefreshOAuthError, isTokenRefreshOAuthFailure, refreshAccessToken, AUTH_FLOW_ENV_VAR, DEFAULT_AUTH_FILENAME, DEFAULT_ENV_FILENAME, resolveEnvFileLocationAsync, resolveEnvFilePathAsync, loadEnvFileAsync, saveEnvFileAsync, CredentialSource, getLoginStatusAsync, getLoginStatusWithDeps, getAuthContext, getAuthEnv, ClientCredentialsAuthenticationError, clientCredentialsLogin, JWT_BEARER_ASSERTION_TYPE, FederatedCredentialsAuthenticationError, federatedCredentialsLogin, fetchTenantsAndOrganizations, TENANT_SELECTION_REQUIRED_CODE, INVALID_TENANT_CODE, TenantSelectionError, TenantSelectionRequiredError, InvalidTenantError, isTenantSelectionError, selectTenantWithDeps, interactiveLoginWithDeps, interactiveLogin, logoutWithDeps, logout, authenticate };
|
|
2486
2558
|
|
|
2487
|
-
//# debugId=
|
|
2559
|
+
//# debugId=73356F710D192F3564756E2164756E21
|