@fangyb/ahchat-bridge 0.1.42 → 0.1.44
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/cli.cjs +32498 -16645
- package/dist/feedbackWorkerCli.cjs +166 -4
- package/dist/index.js +31722 -16110
- package/dist/seedanceMcpCli.cjs +51 -6
- package/dist/seedreamMcpCli.cjs +2425 -95
- package/dist/visionMcpCli.cjs +14 -1
- package/package.json +12 -12
package/dist/visionMcpCli.cjs
CHANGED
|
@@ -31264,6 +31264,7 @@ function parseLogLevel(value, fallback = "INFO") {
|
|
|
31264
31264
|
|
|
31265
31265
|
// ../logger/src/logger.ts
|
|
31266
31266
|
var REDACTED = "***";
|
|
31267
|
+
var REDACTED_PATH = "[path]";
|
|
31267
31268
|
var SENSITIVE_KEY_RE = /(token|apikey|authorization|password|secret|cookie)/i;
|
|
31268
31269
|
function shouldRedactKey(key) {
|
|
31269
31270
|
const normalized = key.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
|
@@ -31271,8 +31272,20 @@ function shouldRedactKey(key) {
|
|
|
31271
31272
|
if (normalized.endsWith("hash")) return false;
|
|
31272
31273
|
return SENSITIVE_KEY_RE.test(normalized);
|
|
31273
31274
|
}
|
|
31275
|
+
function redactFilesystemPaths(value) {
|
|
31276
|
+
return value.replace(/\b[A-Za-z]:\\[^\s"'`<>|]+/g, REDACTED_PATH).replace(/\\\\[^\\\s"'`<>|]+\\[^\s"'`<>|]+/g, REDACTED_PATH).replace(
|
|
31277
|
+
/(^|[\s"'`(=])\/(?:home|Users)\/[^\s"'`<>]+/g,
|
|
31278
|
+
(_match, prefix) => `${prefix}${REDACTED_PATH}`
|
|
31279
|
+
);
|
|
31280
|
+
}
|
|
31274
31281
|
function redactString(value) {
|
|
31275
|
-
return value.replace(/([?&](?:token|api_?key|access_token|refresh_token)=)[^&#\s"']+/gi, `$1${REDACTED}`).replace(
|
|
31282
|
+
return redactFilesystemPaths(value).replace(/([?&](?:token|api_?key|access_token|refresh_token)=)[^&#\s"']+/gi, `$1${REDACTED}`).replace(
|
|
31283
|
+
/("(?:apiKey|token|bridgeToken|authorization|password|secret|cookie|access_token|refresh_token)"\s*:\s*")[^"]*/gi,
|
|
31284
|
+
`$1${REDACTED}`
|
|
31285
|
+
).replace(
|
|
31286
|
+
/((?:apiKey|token|bridgeToken|authorization|password|secret|cookie|access_token|refresh_token)=)[^\s&"']+/gi,
|
|
31287
|
+
`$1${REDACTED}`
|
|
31288
|
+
).replace(/\b(Bearer\s+)[A-Za-z0-9._~+/=-]+/gi, `$1${REDACTED}`).replace(/\bsk-[A-Za-z0-9._-]{6,}\b/g, "sk-***");
|
|
31276
31289
|
}
|
|
31277
31290
|
function serializeError(err) {
|
|
31278
31291
|
if (err instanceof Error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fangyb/ahchat-bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.44",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
"ahchat-seedream-mcp": "dist/seedreamMcpCli.cjs",
|
|
14
14
|
"ahchat-vision-mcp": "dist/visionMcpCli.cjs"
|
|
15
15
|
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"dev": "tsx src/index.ts",
|
|
18
|
+
"start": "tsx src/index.ts",
|
|
19
|
+
"feedback-worker": "tsx src/feedbackWorkerCli.ts",
|
|
20
|
+
"build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsup",
|
|
21
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
22
|
+
},
|
|
16
23
|
"dependencies": {
|
|
17
24
|
"@anthropic-ai/claude-agent-sdk": "^0.3.183",
|
|
18
25
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
@@ -24,20 +31,13 @@
|
|
|
24
31
|
"zod": "^4.0.0"
|
|
25
32
|
},
|
|
26
33
|
"devDependencies": {
|
|
34
|
+
"@ahchat/logger": "workspace:*",
|
|
35
|
+
"@ahchat/shared": "workspace:*",
|
|
27
36
|
"@types/node": "^22.15.21",
|
|
28
37
|
"@types/ws": "^8.5.14",
|
|
29
38
|
"tsup": "^8.0.0",
|
|
30
39
|
"tsx": "^4.19.4",
|
|
31
40
|
"typescript": "^5.8.3",
|
|
32
|
-
"vitest": "^3.1.4"
|
|
33
|
-
"@ahchat/shared": "0.1.0",
|
|
34
|
-
"@ahchat/logger": "0.1.0"
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"dev": "tsx src/index.ts",
|
|
38
|
-
"start": "tsx src/index.ts",
|
|
39
|
-
"feedback-worker": "tsx src/feedbackWorkerCli.ts",
|
|
40
|
-
"build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsup",
|
|
41
|
-
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
41
|
+
"vitest": "^3.1.4"
|
|
42
42
|
}
|
|
43
|
-
}
|
|
43
|
+
}
|