@topolo/sdk 0.14.3 → 0.14.4
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/index.cjs +12 -3
- package/dist/index.js +12 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2050,12 +2050,21 @@ function redactActionResult(value) {
|
|
|
2050
2050
|
if (!isRecord3(value)) return value;
|
|
2051
2051
|
return Object.fromEntries(Object.entries(value).map(([key, item]) => [
|
|
2052
2052
|
key,
|
|
2053
|
-
isSensitiveActionResultKey(key) ? "[REDACTED]" : redactActionResult(item)
|
|
2053
|
+
isSensitiveActionResultKey(key, item) ? "[REDACTED]" : redactActionResult(item)
|
|
2054
2054
|
]));
|
|
2055
2055
|
}
|
|
2056
|
-
function isSensitiveActionResultKey(key) {
|
|
2056
|
+
function isSensitiveActionResultKey(key, value) {
|
|
2057
2057
|
const normalized = key.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
2058
|
-
|
|
2058
|
+
if (normalized === "capability") return isCredentialShaped(value);
|
|
2059
|
+
return ["authorization", "cookie", "setcookie", "proxyauthorization"].includes(normalized) || /(token|secret|password|privatekey|apikey)$/.test(normalized);
|
|
2060
|
+
}
|
|
2061
|
+
var PLAIN_ENUM_VALUE = /^[a-z][a-z0-9_-]{0,31}$/;
|
|
2062
|
+
function isCredentialShaped(value) {
|
|
2063
|
+
if (typeof value !== "string") return value !== null && value !== void 0 && typeof value !== "boolean" && typeof value !== "number";
|
|
2064
|
+
const trimmed = value.trim();
|
|
2065
|
+
if (!trimmed) return false;
|
|
2066
|
+
if (/^[a-z][a-z0-9+.-]*:\/\//i.test(trimmed)) return true;
|
|
2067
|
+
return !PLAIN_ENUM_VALUE.test(trimmed);
|
|
2059
2068
|
}
|
|
2060
2069
|
function resolveConfiguredServiceUrl(slug, serviceUrls) {
|
|
2061
2070
|
for (const serviceKey of serviceKeyCandidates2(slug)) {
|
package/dist/index.js
CHANGED
|
@@ -1964,12 +1964,21 @@ function redactActionResult(value) {
|
|
|
1964
1964
|
if (!isRecord3(value)) return value;
|
|
1965
1965
|
return Object.fromEntries(Object.entries(value).map(([key, item]) => [
|
|
1966
1966
|
key,
|
|
1967
|
-
isSensitiveActionResultKey(key) ? "[REDACTED]" : redactActionResult(item)
|
|
1967
|
+
isSensitiveActionResultKey(key, item) ? "[REDACTED]" : redactActionResult(item)
|
|
1968
1968
|
]));
|
|
1969
1969
|
}
|
|
1970
|
-
function isSensitiveActionResultKey(key) {
|
|
1970
|
+
function isSensitiveActionResultKey(key, value) {
|
|
1971
1971
|
const normalized = key.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
1972
|
-
|
|
1972
|
+
if (normalized === "capability") return isCredentialShaped(value);
|
|
1973
|
+
return ["authorization", "cookie", "setcookie", "proxyauthorization"].includes(normalized) || /(token|secret|password|privatekey|apikey)$/.test(normalized);
|
|
1974
|
+
}
|
|
1975
|
+
var PLAIN_ENUM_VALUE = /^[a-z][a-z0-9_-]{0,31}$/;
|
|
1976
|
+
function isCredentialShaped(value) {
|
|
1977
|
+
if (typeof value !== "string") return value !== null && value !== void 0 && typeof value !== "boolean" && typeof value !== "number";
|
|
1978
|
+
const trimmed = value.trim();
|
|
1979
|
+
if (!trimmed) return false;
|
|
1980
|
+
if (/^[a-z][a-z0-9+.-]*:\/\//i.test(trimmed)) return true;
|
|
1981
|
+
return !PLAIN_ENUM_VALUE.test(trimmed);
|
|
1973
1982
|
}
|
|
1974
1983
|
function resolveConfiguredServiceUrl(slug, serviceUrls) {
|
|
1975
1984
|
for (const serviceKey of serviceKeyCandidates2(slug)) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topolo/sdk",
|
|
3
|
-
"version": "0.14.
|
|
4
|
-
"topoloPublishedVersion": "0.14.
|
|
3
|
+
"version": "0.14.4",
|
|
4
|
+
"topoloPublishedVersion": "0.14.4",
|
|
5
5
|
"description": "Typed client SDK for the Topolo platform. Used by TopoloCli, TopoloMCP, and third-party agents.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"author": "Topolo",
|