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