@uipath/agenthub-tool 1.199.0-preview.92 → 1.199.0-preview.97
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/tool.js +270 -154
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -9140,10 +9140,36 @@ class NodeContextStorage {
|
|
|
9140
9140
|
}
|
|
9141
9141
|
var init_node_context_storage = () => {};
|
|
9142
9142
|
|
|
9143
|
-
// ../common/src/telemetry/
|
|
9143
|
+
// ../common/src/telemetry/trace-context.ts
|
|
9144
9144
|
function getProcessEnv() {
|
|
9145
9145
|
return globalThis.process?.env;
|
|
9146
9146
|
}
|
|
9147
|
+
function parseInboundTraceparent(value) {
|
|
9148
|
+
if (!value) {
|
|
9149
|
+
return;
|
|
9150
|
+
}
|
|
9151
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
9152
|
+
if (!match) {
|
|
9153
|
+
return;
|
|
9154
|
+
}
|
|
9155
|
+
const [, traceId, parentSpanId] = match;
|
|
9156
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
9157
|
+
return;
|
|
9158
|
+
}
|
|
9159
|
+
return { traceId, parentSpanId };
|
|
9160
|
+
}
|
|
9161
|
+
function getInboundTraceContext() {
|
|
9162
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
9163
|
+
}
|
|
9164
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT", TRACEPARENT_PATTERN;
|
|
9165
|
+
var init_trace_context = __esm(() => {
|
|
9166
|
+
TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
9167
|
+
});
|
|
9168
|
+
|
|
9169
|
+
// ../common/src/telemetry/session-id.ts
|
|
9170
|
+
function getProcessEnv2() {
|
|
9171
|
+
return globalThis.process?.env;
|
|
9172
|
+
}
|
|
9147
9173
|
function normalizeSessionId(value) {
|
|
9148
9174
|
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
9149
9175
|
return;
|
|
@@ -9152,15 +9178,27 @@ function normalizeSessionId(value) {
|
|
|
9152
9178
|
return trimmed || undefined;
|
|
9153
9179
|
}
|
|
9154
9180
|
function getConfiguredTelemetrySessionId() {
|
|
9155
|
-
return normalizeSessionId(
|
|
9181
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
9156
9182
|
}
|
|
9157
9183
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
9158
9184
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
9159
9185
|
}
|
|
9160
|
-
|
|
9186
|
+
function getTelemetryOperationId() {
|
|
9187
|
+
const existing = telemetryOperationIdSlot.get();
|
|
9188
|
+
if (existing) {
|
|
9189
|
+
return existing;
|
|
9190
|
+
}
|
|
9191
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
9192
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
9193
|
+
telemetryOperationIdSlot.set(generated);
|
|
9194
|
+
return generated;
|
|
9195
|
+
}
|
|
9196
|
+
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID", TELEMETRY_SESSION_ID_PROPERTY = "session_id", telemetrySessionIdSlot, telemetryOperationIdSlot;
|
|
9161
9197
|
var init_session_id = __esm(() => {
|
|
9162
9198
|
init_singleton();
|
|
9199
|
+
init_trace_context();
|
|
9163
9200
|
telemetrySessionIdSlot = singleton2("TelemetrySessionId");
|
|
9201
|
+
telemetryOperationIdSlot = singleton2("TelemetryOperationId");
|
|
9164
9202
|
});
|
|
9165
9203
|
|
|
9166
9204
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
@@ -9173,6 +9211,140 @@ var init_global_telemetry_properties = __esm(() => {
|
|
|
9173
9211
|
telemetryPropsSlot2 = singleton2("TelemetryDefaultProps");
|
|
9174
9212
|
});
|
|
9175
9213
|
|
|
9214
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
9215
|
+
function shortHash(input) {
|
|
9216
|
+
let hash = 2166136261;
|
|
9217
|
+
for (let i = 0;i < input.length; i++) {
|
|
9218
|
+
hash ^= input.charCodeAt(i);
|
|
9219
|
+
hash = Math.imul(hash, 16777619);
|
|
9220
|
+
}
|
|
9221
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
9222
|
+
}
|
|
9223
|
+
function redactUrl(raw) {
|
|
9224
|
+
try {
|
|
9225
|
+
const url = new URL(raw);
|
|
9226
|
+
return `${url.protocol}//${url.host}`;
|
|
9227
|
+
} catch {
|
|
9228
|
+
return `url#${shortHash(raw)}`;
|
|
9229
|
+
}
|
|
9230
|
+
}
|
|
9231
|
+
function redactValueDetectors(value) {
|
|
9232
|
+
let out = value;
|
|
9233
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
9234
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
9235
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
9236
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
9237
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
9238
|
+
});
|
|
9239
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
9240
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
9241
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
9242
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
9243
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
9244
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
9245
|
+
}
|
|
9246
|
+
return out;
|
|
9247
|
+
}
|
|
9248
|
+
function redactValue(value) {
|
|
9249
|
+
return redactValueDetectors(value);
|
|
9250
|
+
}
|
|
9251
|
+
function redactError(error) {
|
|
9252
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
9253
|
+
safe.name = error.name;
|
|
9254
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
9255
|
+
return safe;
|
|
9256
|
+
}
|
|
9257
|
+
function nameTokens(name) {
|
|
9258
|
+
return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t) => t.toLowerCase()).filter(Boolean);
|
|
9259
|
+
}
|
|
9260
|
+
function isSensitiveName(name) {
|
|
9261
|
+
const tokens = nameTokens(name);
|
|
9262
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
9263
|
+
const token = tokens[i];
|
|
9264
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
9265
|
+
return true;
|
|
9266
|
+
}
|
|
9267
|
+
if (token === "key" || token === "keys") {
|
|
9268
|
+
const prev = tokens[i - 1];
|
|
9269
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
9270
|
+
return true;
|
|
9271
|
+
}
|
|
9272
|
+
}
|
|
9273
|
+
}
|
|
9274
|
+
return false;
|
|
9275
|
+
}
|
|
9276
|
+
function redactProperty(name, value) {
|
|
9277
|
+
if (value === undefined || value === null) {
|
|
9278
|
+
return;
|
|
9279
|
+
}
|
|
9280
|
+
if (isSensitiveName(name)) {
|
|
9281
|
+
return REDACTED;
|
|
9282
|
+
}
|
|
9283
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
9284
|
+
return value;
|
|
9285
|
+
}
|
|
9286
|
+
if (typeof value !== "string") {
|
|
9287
|
+
return "[OBJECT]";
|
|
9288
|
+
}
|
|
9289
|
+
return redactValueDetectors(value);
|
|
9290
|
+
}
|
|
9291
|
+
function redactProperties(properties) {
|
|
9292
|
+
const out = {};
|
|
9293
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
9294
|
+
const redacted = redactProperty(name, value);
|
|
9295
|
+
if (redacted !== undefined) {
|
|
9296
|
+
out[name] = redacted;
|
|
9297
|
+
}
|
|
9298
|
+
}
|
|
9299
|
+
return out;
|
|
9300
|
+
}
|
|
9301
|
+
var REDACTED = "[REDACTED]", MAX_VALUE_LENGTH = 200, SENSITIVE_NAME_TOKENS, SENSITIVE_KEY_PREFIXES, UUID_PATTERN, EMAIL_PATTERN, JWT_PATTERN, LONG_TOKEN_PATTERN, USER_HOME_PATTERN, URL_PATTERN, URL_TRAILING_PUNCT;
|
|
9302
|
+
var init_pii_redactor = __esm(() => {
|
|
9303
|
+
SENSITIVE_NAME_TOKENS = new Set([
|
|
9304
|
+
"token",
|
|
9305
|
+
"tokens",
|
|
9306
|
+
"secret",
|
|
9307
|
+
"secrets",
|
|
9308
|
+
"password",
|
|
9309
|
+
"passwords",
|
|
9310
|
+
"pwd",
|
|
9311
|
+
"credential",
|
|
9312
|
+
"credentials",
|
|
9313
|
+
"auth",
|
|
9314
|
+
"authentication",
|
|
9315
|
+
"authorization",
|
|
9316
|
+
"authority",
|
|
9317
|
+
"cert",
|
|
9318
|
+
"certificate",
|
|
9319
|
+
"certificates"
|
|
9320
|
+
]);
|
|
9321
|
+
SENSITIVE_KEY_PREFIXES = new Set([
|
|
9322
|
+
"api",
|
|
9323
|
+
"access",
|
|
9324
|
+
"client",
|
|
9325
|
+
"private",
|
|
9326
|
+
"public",
|
|
9327
|
+
"signing",
|
|
9328
|
+
"encryption",
|
|
9329
|
+
"session",
|
|
9330
|
+
"master",
|
|
9331
|
+
"shared",
|
|
9332
|
+
"root",
|
|
9333
|
+
"ssh",
|
|
9334
|
+
"rsa",
|
|
9335
|
+
"aes",
|
|
9336
|
+
"hmac",
|
|
9337
|
+
"oauth"
|
|
9338
|
+
]);
|
|
9339
|
+
UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
9340
|
+
EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
9341
|
+
JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
9342
|
+
LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
9343
|
+
USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
9344
|
+
URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
9345
|
+
URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
9346
|
+
});
|
|
9347
|
+
|
|
9176
9348
|
// ../common/src/telemetry/telemetry-service.ts
|
|
9177
9349
|
class TelemetryService {
|
|
9178
9350
|
telemetryProvider;
|
|
@@ -9200,11 +9372,15 @@ class TelemetryService {
|
|
|
9200
9372
|
trackException(error, properties) {
|
|
9201
9373
|
const context = this.getCurrentContext();
|
|
9202
9374
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
9203
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
9375
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
9204
9376
|
}
|
|
9205
9377
|
async trackRequest(name, fn, properties) {
|
|
9378
|
+
const parentContext = this.getCurrentContext();
|
|
9379
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
9380
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
9206
9381
|
const context = {
|
|
9207
|
-
operationId
|
|
9382
|
+
operationId,
|
|
9383
|
+
...parentId !== undefined ? { parentId } : {},
|
|
9208
9384
|
id: this.generateId()
|
|
9209
9385
|
};
|
|
9210
9386
|
const startTime = performance.now();
|
|
@@ -9222,6 +9398,45 @@ class TelemetryService {
|
|
|
9222
9398
|
throw error;
|
|
9223
9399
|
}
|
|
9224
9400
|
}
|
|
9401
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
9402
|
+
const requestContext = context ?? {
|
|
9403
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
9404
|
+
id: this.generateId()
|
|
9405
|
+
};
|
|
9406
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
9407
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
9408
|
+
}
|
|
9409
|
+
createRequestContext() {
|
|
9410
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
9411
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
9412
|
+
return {
|
|
9413
|
+
operationId,
|
|
9414
|
+
...parentId !== undefined ? { parentId } : {},
|
|
9415
|
+
id: this.generateId()
|
|
9416
|
+
};
|
|
9417
|
+
}
|
|
9418
|
+
inboundParentIdFor(operationId) {
|
|
9419
|
+
const inbound = getInboundTraceContext();
|
|
9420
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
9421
|
+
}
|
|
9422
|
+
runWithContext(context, fn) {
|
|
9423
|
+
return this.contextStorage.run(context, fn);
|
|
9424
|
+
}
|
|
9425
|
+
createDependencyContext() {
|
|
9426
|
+
const parentContext = this.getCurrentContext();
|
|
9427
|
+
if (!parentContext) {
|
|
9428
|
+
return;
|
|
9429
|
+
}
|
|
9430
|
+
return {
|
|
9431
|
+
operationId: parentContext.operationId,
|
|
9432
|
+
parentId: parentContext.id,
|
|
9433
|
+
id: this.generateId()
|
|
9434
|
+
};
|
|
9435
|
+
}
|
|
9436
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
9437
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
9438
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
9439
|
+
}
|
|
9225
9440
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
9226
9441
|
const parentContext = this.getCurrentContext();
|
|
9227
9442
|
if (!parentContext) {
|
|
@@ -9258,8 +9473,12 @@ class TelemetryService {
|
|
|
9258
9473
|
...getExecutionContextTelemetryProperties(),
|
|
9259
9474
|
...globalProperties,
|
|
9260
9475
|
...this.defaultProperties,
|
|
9261
|
-
...properties,
|
|
9262
|
-
...context
|
|
9476
|
+
...redactProperties(properties ?? {}),
|
|
9477
|
+
...context ? {
|
|
9478
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
9479
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
9480
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
9481
|
+
} : {}
|
|
9263
9482
|
};
|
|
9264
9483
|
if (sessionId === undefined) {
|
|
9265
9484
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -9269,13 +9488,30 @@ class TelemetryService {
|
|
|
9269
9488
|
return enriched;
|
|
9270
9489
|
}
|
|
9271
9490
|
generateId() {
|
|
9272
|
-
|
|
9491
|
+
const bytes = new Uint8Array(8);
|
|
9492
|
+
let hex = "";
|
|
9493
|
+
do {
|
|
9494
|
+
crypto.getRandomValues(bytes);
|
|
9495
|
+
hex = "";
|
|
9496
|
+
for (const byte of bytes) {
|
|
9497
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
9498
|
+
}
|
|
9499
|
+
} while (/^0+$/.test(hex));
|
|
9500
|
+
return hex;
|
|
9273
9501
|
}
|
|
9274
9502
|
}
|
|
9503
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id", TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id", TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
9275
9504
|
var init_telemetry_service = __esm(() => {
|
|
9276
9505
|
init_execution_context();
|
|
9277
9506
|
init_global_telemetry_properties();
|
|
9507
|
+
init_pii_redactor();
|
|
9278
9508
|
init_session_id();
|
|
9509
|
+
init_trace_context();
|
|
9510
|
+
});
|
|
9511
|
+
|
|
9512
|
+
// ../common/src/telemetry/tracked-fetch.ts
|
|
9513
|
+
var init_tracked_fetch = __esm(() => {
|
|
9514
|
+
init_telemetry_init();
|
|
9279
9515
|
});
|
|
9280
9516
|
|
|
9281
9517
|
// ../common/src/telemetry/node.ts
|
|
@@ -9287,6 +9523,8 @@ var init_node3 = __esm(() => {
|
|
|
9287
9523
|
init_node_context_storage();
|
|
9288
9524
|
init_session_id();
|
|
9289
9525
|
init_telemetry_service();
|
|
9526
|
+
init_trace_context();
|
|
9527
|
+
init_tracked_fetch();
|
|
9290
9528
|
});
|
|
9291
9529
|
|
|
9292
9530
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -9296,6 +9534,7 @@ var init_node_appinsights_telemetry_provider = __esm(() => {
|
|
|
9296
9534
|
init_singleton();
|
|
9297
9535
|
init_global_telemetry_properties();
|
|
9298
9536
|
init_session_id();
|
|
9537
|
+
init_telemetry_service();
|
|
9299
9538
|
init_global_telemetry_properties();
|
|
9300
9539
|
providerSlot = singleton2("TelemetryProvider");
|
|
9301
9540
|
});
|
|
@@ -10014,150 +10253,21 @@ var init_command_attribution = __esm(() => {
|
|
|
10014
10253
|
]).sort((a, b) => b.prefix.length - a.prefix.length);
|
|
10015
10254
|
});
|
|
10016
10255
|
|
|
10017
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
10018
|
-
function shortHash(input) {
|
|
10019
|
-
let hash = 2166136261;
|
|
10020
|
-
for (let i = 0;i < input.length; i++) {
|
|
10021
|
-
hash ^= input.charCodeAt(i);
|
|
10022
|
-
hash = Math.imul(hash, 16777619);
|
|
10023
|
-
}
|
|
10024
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
10025
|
-
}
|
|
10026
|
-
function redactUrl(raw) {
|
|
10027
|
-
try {
|
|
10028
|
-
const url = new URL(raw);
|
|
10029
|
-
return `${url.protocol}//${url.host}`;
|
|
10030
|
-
} catch {
|
|
10031
|
-
return `url#${shortHash(raw)}`;
|
|
10032
|
-
}
|
|
10033
|
-
}
|
|
10034
|
-
function redactValueDetectors(value) {
|
|
10035
|
-
let out = value;
|
|
10036
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
10037
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
10038
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
10039
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
10040
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
10041
|
-
});
|
|
10042
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
10043
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
10044
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
10045
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
10046
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
10047
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
10048
|
-
}
|
|
10049
|
-
return out;
|
|
10050
|
-
}
|
|
10051
|
-
function nameTokens(name) {
|
|
10052
|
-
return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s_-]+/).map((t) => t.toLowerCase()).filter(Boolean);
|
|
10053
|
-
}
|
|
10054
|
-
function isSensitiveName(name) {
|
|
10055
|
-
const tokens = nameTokens(name);
|
|
10056
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
10057
|
-
const token = tokens[i];
|
|
10058
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
10059
|
-
return true;
|
|
10060
|
-
}
|
|
10061
|
-
if (token === "key" || token === "keys") {
|
|
10062
|
-
const prev = tokens[i - 1];
|
|
10063
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
10064
|
-
return true;
|
|
10065
|
-
}
|
|
10066
|
-
}
|
|
10067
|
-
}
|
|
10068
|
-
return false;
|
|
10069
|
-
}
|
|
10070
|
-
function redactProperty(name, value) {
|
|
10071
|
-
if (value === undefined || value === null) {
|
|
10072
|
-
return;
|
|
10073
|
-
}
|
|
10074
|
-
if (isSensitiveName(name)) {
|
|
10075
|
-
return REDACTED;
|
|
10076
|
-
}
|
|
10077
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
10078
|
-
return value;
|
|
10079
|
-
}
|
|
10080
|
-
if (typeof value !== "string") {
|
|
10081
|
-
return "[OBJECT]";
|
|
10082
|
-
}
|
|
10083
|
-
return redactValueDetectors(value);
|
|
10084
|
-
}
|
|
10085
|
-
function redactProperties(properties) {
|
|
10086
|
-
const out = {};
|
|
10087
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
10088
|
-
const redacted = redactProperty(name, value);
|
|
10089
|
-
if (redacted !== undefined) {
|
|
10090
|
-
out[name] = redacted;
|
|
10091
|
-
}
|
|
10092
|
-
}
|
|
10093
|
-
return out;
|
|
10094
|
-
}
|
|
10095
|
-
var REDACTED = "[REDACTED]", MAX_VALUE_LENGTH = 200, SENSITIVE_NAME_TOKENS, SENSITIVE_KEY_PREFIXES, UUID_PATTERN, EMAIL_PATTERN, JWT_PATTERN, LONG_TOKEN_PATTERN, USER_HOME_PATTERN, URL_PATTERN, URL_TRAILING_PUNCT;
|
|
10096
|
-
var init_pii_redactor = __esm(() => {
|
|
10097
|
-
SENSITIVE_NAME_TOKENS = new Set([
|
|
10098
|
-
"token",
|
|
10099
|
-
"tokens",
|
|
10100
|
-
"secret",
|
|
10101
|
-
"secrets",
|
|
10102
|
-
"password",
|
|
10103
|
-
"passwords",
|
|
10104
|
-
"pwd",
|
|
10105
|
-
"credential",
|
|
10106
|
-
"credentials",
|
|
10107
|
-
"auth",
|
|
10108
|
-
"authentication",
|
|
10109
|
-
"authorization",
|
|
10110
|
-
"authority",
|
|
10111
|
-
"cert",
|
|
10112
|
-
"certificate",
|
|
10113
|
-
"certificates"
|
|
10114
|
-
]);
|
|
10115
|
-
SENSITIVE_KEY_PREFIXES = new Set([
|
|
10116
|
-
"api",
|
|
10117
|
-
"access",
|
|
10118
|
-
"client",
|
|
10119
|
-
"private",
|
|
10120
|
-
"public",
|
|
10121
|
-
"signing",
|
|
10122
|
-
"encryption",
|
|
10123
|
-
"session",
|
|
10124
|
-
"master",
|
|
10125
|
-
"shared",
|
|
10126
|
-
"root",
|
|
10127
|
-
"ssh",
|
|
10128
|
-
"rsa",
|
|
10129
|
-
"aes",
|
|
10130
|
-
"hmac",
|
|
10131
|
-
"oauth"
|
|
10132
|
-
]);
|
|
10133
|
-
UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
10134
|
-
EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
10135
|
-
JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
10136
|
-
LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
10137
|
-
USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
10138
|
-
URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
10139
|
-
URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
10140
|
-
});
|
|
10141
|
-
|
|
10142
10256
|
// ../common/src/trackedAction.ts
|
|
10143
10257
|
function extractCommandParams(cmd) {
|
|
10144
10258
|
const params = {};
|
|
10259
|
+
const add2 = (name, value) => {
|
|
10260
|
+
if (name && value !== undefined) {
|
|
10261
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
10262
|
+
}
|
|
10263
|
+
};
|
|
10145
10264
|
const registered = cmd.registeredArguments ?? [];
|
|
10146
10265
|
const processed = cmd.processedArgs ?? [];
|
|
10147
10266
|
for (let i = 0;i < registered.length; i++) {
|
|
10148
|
-
|
|
10149
|
-
if (value === undefined) {
|
|
10150
|
-
continue;
|
|
10151
|
-
}
|
|
10152
|
-
const name = registered[i].name();
|
|
10153
|
-
if (name) {
|
|
10154
|
-
params[name] = value;
|
|
10155
|
-
}
|
|
10267
|
+
add2(registered[i].name(), processed[i]);
|
|
10156
10268
|
}
|
|
10157
10269
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
10158
|
-
|
|
10159
|
-
params[key] = value;
|
|
10160
|
-
}
|
|
10270
|
+
add2(key, value);
|
|
10161
10271
|
}
|
|
10162
10272
|
return params;
|
|
10163
10273
|
}
|
|
@@ -10195,7 +10305,7 @@ function isPromptCancellation(error) {
|
|
|
10195
10305
|
function exitCodeFromProcess(fallback) {
|
|
10196
10306
|
return typeof process.exitCode === "number" ? process.exitCode : fallback;
|
|
10197
10307
|
}
|
|
10198
|
-
var pollSignalSlot, cliErrorCodeValues, retryHintValues, processContext;
|
|
10308
|
+
var pollSignalSlot, cliErrorCodeValues, retryHintValues, TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.", processContext;
|
|
10199
10309
|
var init_trackedAction = __esm(() => {
|
|
10200
10310
|
init_esm();
|
|
10201
10311
|
init_formatter();
|
|
@@ -10221,11 +10331,12 @@ var init_trackedAction = __esm(() => {
|
|
|
10221
10331
|
return this.action(async (...args) => {
|
|
10222
10332
|
const telemetryName = deriveCommandPath(command);
|
|
10223
10333
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
10334
|
+
const requestContext = telemetry.createRequestContext();
|
|
10224
10335
|
const startTime = performance.now();
|
|
10225
10336
|
let errorMessage2;
|
|
10226
10337
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
10227
10338
|
clearRecordedCommandFailureTelemetry();
|
|
10228
|
-
const [error] = await catchError2(fn(...args));
|
|
10339
|
+
const [error] = await catchError2(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
10229
10340
|
if (error) {
|
|
10230
10341
|
errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
10231
10342
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage2}`);
|
|
@@ -10261,16 +10372,21 @@ var init_trackedAction = __esm(() => {
|
|
|
10261
10372
|
recordedFailure,
|
|
10262
10373
|
pollSignal: context.pollSignal
|
|
10263
10374
|
});
|
|
10264
|
-
|
|
10265
|
-
|
|
10375
|
+
const commandParams = extractCommandParams(command);
|
|
10376
|
+
if (props) {
|
|
10377
|
+
for (const key of Object.keys(props)) {
|
|
10378
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
10379
|
+
}
|
|
10380
|
+
}
|
|
10381
|
+
const baseProperties = redactProperties({
|
|
10382
|
+
...commandParams,
|
|
10266
10383
|
...props,
|
|
10267
10384
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
10268
10385
|
command: "true",
|
|
10269
|
-
duration: String(durationMs),
|
|
10270
|
-
success: String(success),
|
|
10271
10386
|
...terminalTelemetry,
|
|
10272
10387
|
...errorMessage2 ? { errorMessage: errorMessage2 } : {}
|
|
10273
|
-
})
|
|
10388
|
+
});
|
|
10389
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
10274
10390
|
});
|
|
10275
10391
|
};
|
|
10276
10392
|
});
|
|
@@ -67531,7 +67647,7 @@ init_esm();
|
|
|
67531
67647
|
var package_default = {
|
|
67532
67648
|
name: "@uipath/agenthub-tool",
|
|
67533
67649
|
license: "MIT",
|
|
67534
|
-
version: "1.199.0-preview.
|
|
67650
|
+
version: "1.199.0-preview.97",
|
|
67535
67651
|
description: "Manage UiPath AgentHub MCP server registrations, tools, and remote A2A agents.",
|
|
67536
67652
|
private: false,
|
|
67537
67653
|
repository: {
|
|
@@ -90770,7 +90886,7 @@ class TextApiResponse2 {
|
|
|
90770
90886
|
var package_default4 = {
|
|
90771
90887
|
name: "@uipath/integrationservice-sdk",
|
|
90772
90888
|
license: "MIT",
|
|
90773
|
-
version: "1.199.0-preview.
|
|
90889
|
+
version: "1.199.0-preview.97",
|
|
90774
90890
|
repository: {
|
|
90775
90891
|
type: "git",
|
|
90776
90892
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -99575,4 +99691,4 @@ export {
|
|
|
99575
99691
|
createStandaloneProgram
|
|
99576
99692
|
};
|
|
99577
99693
|
|
|
99578
|
-
//# debugId=
|
|
99694
|
+
//# debugId=0A4A728AE86E9F0D64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/agenthub-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.199.0-preview.
|
|
4
|
+
"version": "1.199.0-preview.97",
|
|
5
5
|
"description": "Manage UiPath AgentHub MCP server registrations, tools, and remote A2A agents.",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "087ae21e842f27bde5eb0013892c9487bfe60568"
|
|
30
30
|
}
|