sx-platform-mcp 0.0.3 → 0.0.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/.env.example +1 -0
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/.env.example
CHANGED
|
@@ -26,6 +26,7 @@ SX_BASE_URL=http://127.0.0.1:8000
|
|
|
26
26
|
|
|
27
27
|
# 其它可选配置(一般不用动):
|
|
28
28
|
# SX_TENANT_ID=000000 兜底租户,调用方没带 sx-tenant-id 时使用
|
|
29
|
+
# SX_API_SECRET= 平台 API Secret;登录换令牌时作为 apiSecret 参数
|
|
29
30
|
# SX_TOOL_GROUPS=all 只注册指定分组,逗号分隔;all 表示不限制
|
|
30
31
|
# SX_TOOL_GROUPS_EXCLUDE= 屏蔽指定分组(优先级高于白名单)
|
|
31
32
|
# SX_ALLOW_WRITES=true 是否允许写操作
|
package/dist/index.js
CHANGED
|
@@ -19776,6 +19776,7 @@ function loadConfig() {
|
|
|
19776
19776
|
account: readSecret("SX_ACCOUNT"),
|
|
19777
19777
|
password: readSecret("SX_PASSWORD"),
|
|
19778
19778
|
passwordMode: readPasswordMode(),
|
|
19779
|
+
apiSecret: readSecret("SX_API_SECRET"),
|
|
19779
19780
|
timeoutMs: envInt(3e4, "SX_TIMEOUT_MS"),
|
|
19780
19781
|
maxResponseChars: envInt(6e4, "SX_MAX_RESPONSE_CHARS"),
|
|
19781
19782
|
allowWrites: envBool(true, "SX_ALLOW_WRITES"),
|
|
@@ -20055,7 +20056,8 @@ var SxClient = class {
|
|
|
20055
20056
|
username: cred.account,
|
|
20056
20057
|
password: toSubmitPassword(cred.password, cred.passwordMode ?? "md5"),
|
|
20057
20058
|
scope: "all",
|
|
20058
|
-
tenantId: tenantId ?? ""
|
|
20059
|
+
tenantId: tenantId ?? "",
|
|
20060
|
+
...this.config.apiSecret === void 0 ? {} : { apiSecret: this.config.apiSecret }
|
|
20059
20061
|
}
|
|
20060
20062
|
});
|
|
20061
20063
|
/**
|