@akasha-book/mcp 1.1.1 → 1.1.2
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/cordis.patch.yml +0 -1
- package/index.js +7 -0
- package/package.json +17 -16
package/cordis.patch.yml
CHANGED
package/index.js
CHANGED
|
@@ -214,6 +214,13 @@ export function createToolDefinition(client, { serverName, tool, toolCallTimeout
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
export async function apply(ctx, config = {}) {
|
|
217
|
+
|
|
218
|
+
// A/B 实验开关(2026-10-10 用户解冻,见 docs/ab-experiment-design.md §6):
|
|
219
|
+
// abOff=true ⇒ **关闭臂**——本插件不注册任何守卫/注入/工具,只记一行观测;库文件与日志照旧(便于事后复盘)。
|
|
220
|
+
if (config.abOff === true) {
|
|
221
|
+
try { (ctx.logger?.info ?? (() => {}))('mcp: abOff=true(A/B 关闭臂)——本插件不注册任何面'); } catch { /* 静默 */ }
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
217
224
|
const cfg = { ...DEFAULTS, ...(config ?? {}) };
|
|
218
225
|
const log = (message) => { try { ctx.logger?.info?.(`mcp-akasha(${cfg.serverName}): ${message}`); } catch { /* 日志失败不影响主流程 */ } };
|
|
219
226
|
const logError = (message) => { try { ctx.logger?.error?.(`mcp-akasha(${cfg.serverName}): ${message}`); } catch { /* 同上 */ } };
|
package/package.json
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akasha-book/mcp",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
"version": "1.1.2",
|
|
4
|
+
"engines": {
|
|
5
|
+
"node": ">=22.15.0"
|
|
6
|
+
},
|
|
7
7
|
"type": "module",
|
|
8
|
-
"description": "阿卡夏之书 MCP
|
|
8
|
+
"description": "阿卡夏之书 MCP 注册桥(自带 stdio 客户端;不引用任何 @deepseek-ai/* 包)",
|
|
9
9
|
"main": "index.js",
|
|
10
|
-
"exports": {
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./index.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"index.js",
|
|
15
|
+
"cordis.patch.yml",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
13
18
|
"dsh": {
|
|
14
19
|
"bundle": {
|
|
15
20
|
"patch": "./cordis.patch.yml"
|
|
16
|
-
},
|
|
17
|
-
"compatibility": {
|
|
18
|
-
"dshReleases": {
|
|
19
|
-
"0.2.0-rc.2": "compatible",
|
|
20
|
-
"0.2.1-alpha.1": "compatible",
|
|
21
|
-
"0.2.1-alpha.2": "compatible"
|
|
22
|
-
}
|
|
23
21
|
}
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
24
25
|
}
|
|
25
|
-
}
|
|
26
|
+
}
|