liangzimixin 0.3.56 → 0.3.57

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 CHANGED
@@ -17464,8 +17464,8 @@ var AccountConfigSchema = external_exports.object({
17464
17464
  * 如果不填,需要通过其他 API 在运行时获取。
17465
17465
  */
17466
17466
  botUserId: external_exports.string().optional(),
17467
- /** 🟡 部署环境 — staging=联调, production=线上 */
17468
- env: external_exports.enum(["staging", "production"]).optional(),
17467
+ /** 🟡 部署环境 — test=测试, staging=联调, production=线上 */
17468
+ env: external_exports.enum(["test", "staging", "production"]).optional(),
17469
17469
  /** 🟡 消息加密模式 — quantum_only=仅加密, quantum_and_plain=加密+普通(默认) */
17470
17470
  encryptionMode: external_exports.enum(["quantum_only", "quantum_and_plain"]).default("quantum_and_plain")
17471
17471
  }).transform((raw) => ({
@@ -17480,6 +17480,13 @@ var AccountConfigSchema = external_exports.object({
17480
17480
  encryptionMode: raw.encryptionMode
17481
17481
  }));
17482
17482
  var ENV_PRESETS = {
17483
+ /** 测试环境 */
17484
+ test: {
17485
+ apiBaseUrl: "https://impre.zdxlz.com:18442/open-apis/v1",
17486
+ wsBaseUrl: "wss://impre.zdxlz.com:18442/open-apis/v1",
17487
+ msgBaseUrl: "https://impre.zdxlz.com:18442/open-apis/v1",
17488
+ fileBaseUrl: "https://impre.zdxlz.com:18442/open-apis/v1"
17489
+ },
17483
17490
  /** 联调环境 */
17484
17491
  staging: {
17485
17492
  apiBaseUrl: "https://mxpre.zdxlz.com:1443/open-apis/v1",
@@ -17498,7 +17505,8 @@ var ENV_PRESETS = {
17498
17505
  function resolveEnv(accountEnv) {
17499
17506
  if (accountEnv) return accountEnv;
17500
17507
  const raw = (process.env.LZMX_ENV || "").trim().toLowerCase();
17501
- if (raw === "staging" || raw === "test" || raw === "dev") return "staging";
17508
+ if (raw === "test") return "test";
17509
+ if (raw === "staging" || raw === "dev") return "staging";
17502
17510
  return "production";
17503
17511
  }
17504
17512
  var CURRENT_ENV = resolveEnv();
@@ -18917,8 +18925,8 @@ var QUANTUM_IM_CONFIG_JSON_SCHEMA = {
18917
18925
  env: {
18918
18926
  type: "string",
18919
18927
  title: "\u90E8\u7F72\u73AF\u5883",
18920
- description: "\u9009\u62E9\u5BF9\u63A5\u7684\u670D\u52A1\u5668\u73AF\u5883\u3002staging = \u8054\u8C03\u73AF\u5883\uFF0Cproduction = \u7EBF\u4E0A\u73AF\u5883",
18921
- enum: ["staging", "production"],
18928
+ description: "\u9009\u62E9\u5BF9\u63A5\u7684\u670D\u52A1\u5668\u73AF\u5883\u3002test = \u6D4B\u8BD5\u73AF\u5883\uFF0Cstaging = \u8054\u8C03\u73AF\u5883\uFF0Cproduction = \u7EBF\u4E0A\u73AF\u5883",
18929
+ enum: ["test", "staging", "production"],
18922
18930
  default: "production"
18923
18931
  },
18924
18932
  encryptionMode: {
@@ -19330,6 +19338,7 @@ var import_node_fs = require("fs");
19330
19338
  var import_node_path = require("path");
19331
19339
  var log14 = createLogger("crypto/quantum-plug");
19332
19340
  var KMS_URLS = {
19341
+ test: "http://223.244.14.238:8552",
19333
19342
  staging: "http://223.244.14.238:8552",
19334
19343
  production: "https://cmsp.zdxlz.com:8552"
19335
19344
  };
@@ -19428,7 +19437,7 @@ var CryptoEngine = class _CryptoEngine {
19428
19437
  * 构造加密引擎 (加密模式)
19429
19438
  *
19430
19439
  * @param credentials - 量子 SDK 所需的凭据
19431
- * @param env - 部署环境 ('staging' | 'production')
19440
+ * @param env - 部署环境 ('test' | 'staging' | 'production')
19432
19441
  */
19433
19442
  constructor(credentials, env = "production") {
19434
19443
  this.plug = quantum_plug_default;
package/dist/index.d.cts CHANGED
@@ -20,6 +20,7 @@ declare const AccountConfigSchema: z.ZodPipe<z.ZodObject<{
20
20
  quantumAccount: z.ZodOptional<z.ZodString>;
21
21
  botUserId: z.ZodOptional<z.ZodString>;
22
22
  env: z.ZodOptional<z.ZodEnum<{
23
+ test: "test";
23
24
  staging: "staging";
24
25
  production: "production";
25
26
  }>>;
@@ -32,7 +33,7 @@ declare const AccountConfigSchema: z.ZodPipe<z.ZodObject<{
32
33
  appSecret: string;
33
34
  quantumAccount: string | undefined;
34
35
  botUserId: string | undefined;
35
- env: "staging" | "production" | undefined;
36
+ env: "test" | "staging" | "production" | undefined;
36
37
  encryptionMode: "quantum_only" | "quantum_and_plain";
37
38
  }, {
38
39
  appId: string;
@@ -40,11 +41,11 @@ declare const AccountConfigSchema: z.ZodPipe<z.ZodObject<{
40
41
  encryptionMode: "quantum_only" | "quantum_and_plain";
41
42
  quantumAccount?: string | undefined;
42
43
  botUserId?: string | undefined;
43
- env?: "staging" | "production" | undefined;
44
+ env?: "test" | "staging" | "production" | undefined;
44
45
  }>>;
45
46
  type AccountConfig = z.output<typeof AccountConfigSchema>;
46
47
  /** 支持的部署环境 */
47
- type DeployEnv = 'staging' | 'production';
48
+ type DeployEnv = 'test' | 'staging' | 'production';
48
49
  /** 运维级内部配置 — 由运维提供,直接在代码或环境变量中设定 */
49
50
  interface InternalConfig {
50
51
  /** 🟡 插件唯一标识 */
@@ -383,7 +384,7 @@ declare class CryptoEngine {
383
384
  * 构造加密引擎 (加密模式)
384
385
  *
385
386
  * @param credentials - 量子 SDK 所需的凭据
386
- * @param env - 部署环境 ('staging' | 'production')
387
+ * @param env - 部署环境 ('test' | 'staging' | 'production')
387
388
  */
388
389
  constructor(credentials: CryptoCredentials, env?: string);
389
390
  /**
@@ -1186,8 +1187,8 @@ declare const QUANTUM_IM_CONFIG_JSON_SCHEMA: {
1186
1187
  readonly env: {
1187
1188
  readonly type: "string";
1188
1189
  readonly title: "部署环境";
1189
- readonly description: "选择对接的服务器环境。staging = 联调环境,production = 线上环境";
1190
- readonly enum: readonly ["staging", "production"];
1190
+ readonly description: "选择对接的服务器环境。test = 测试环境,staging = 联调环境,production = 线上环境";
1191
+ readonly enum: readonly ["test", "staging", "production"];
1191
1192
  readonly default: "production";
1192
1193
  };
1193
1194
  readonly encryptionMode: {
@@ -18217,8 +18217,8 @@ var AccountConfigSchema = external_exports.object({
18217
18217
  * 如果不填,需要通过其他 API 在运行时获取。
18218
18218
  */
18219
18219
  botUserId: external_exports.string().optional(),
18220
- /** 🟡 部署环境 — staging=联调, production=线上 */
18221
- env: external_exports.enum(["staging", "production"]).optional(),
18220
+ /** 🟡 部署环境 — test=测试, staging=联调, production=线上 */
18221
+ env: external_exports.enum(["test", "staging", "production"]).optional(),
18222
18222
  /** 🟡 消息加密模式 — quantum_only=仅加密, quantum_and_plain=加密+普通(默认) */
18223
18223
  encryptionMode: external_exports.enum(["quantum_only", "quantum_and_plain"]).default("quantum_and_plain")
18224
18224
  }).transform((raw) => ({
@@ -18233,6 +18233,13 @@ var AccountConfigSchema = external_exports.object({
18233
18233
  encryptionMode: raw.encryptionMode
18234
18234
  }));
18235
18235
  var ENV_PRESETS = {
18236
+ /** 测试环境 */
18237
+ test: {
18238
+ apiBaseUrl: "https://impre.zdxlz.com:18442/open-apis/v1",
18239
+ wsBaseUrl: "wss://impre.zdxlz.com:18442/open-apis/v1",
18240
+ msgBaseUrl: "https://impre.zdxlz.com:18442/open-apis/v1",
18241
+ fileBaseUrl: "https://impre.zdxlz.com:18442/open-apis/v1"
18242
+ },
18236
18243
  /** 联调环境 */
18237
18244
  staging: {
18238
18245
  apiBaseUrl: "https://mxpre.zdxlz.com:1443/open-apis/v1",
@@ -18251,7 +18258,8 @@ var ENV_PRESETS = {
18251
18258
  function resolveEnv(accountEnv) {
18252
18259
  if (accountEnv) return accountEnv;
18253
18260
  const raw = (process.env.LZMX_ENV || "").trim().toLowerCase();
18254
- if (raw === "staging" || raw === "test" || raw === "dev") return "staging";
18261
+ if (raw === "test") return "test";
18262
+ if (raw === "staging" || raw === "dev") return "staging";
18255
18263
  return "production";
18256
18264
  }
18257
18265
  var CURRENT_ENV = resolveEnv();
@@ -18328,6 +18336,7 @@ var import_node_fs = require("fs");
18328
18336
  var import_node_path = require("path");
18329
18337
  var log5 = createLogger("crypto/quantum-plug");
18330
18338
  var KMS_URLS = {
18339
+ test: "http://223.244.14.238:8552",
18331
18340
  staging: "http://223.244.14.238:8552",
18332
18341
  production: "https://cmsp.zdxlz.com:8552"
18333
18342
  };
@@ -18426,7 +18435,7 @@ var CryptoEngine = class _CryptoEngine {
18426
18435
  * 构造加密引擎 (加密模式)
18427
18436
  *
18428
18437
  * @param credentials - 量子 SDK 所需的凭据
18429
- * @param env - 部署环境 ('staging' | 'production')
18438
+ * @param env - 部署环境 ('test' | 'staging' | 'production')
18430
18439
  */
18431
18440
  constructor(credentials, env = "production") {
18432
18441
  this.plug = quantum_plug_default;
@@ -20264,8 +20273,8 @@ var QUANTUM_IM_CONFIG_JSON_SCHEMA = {
20264
20273
  env: {
20265
20274
  type: "string",
20266
20275
  title: "\u90E8\u7F72\u73AF\u5883",
20267
- description: "\u9009\u62E9\u5BF9\u63A5\u7684\u670D\u52A1\u5668\u73AF\u5883\u3002staging = \u8054\u8C03\u73AF\u5883\uFF0Cproduction = \u7EBF\u4E0A\u73AF\u5883",
20268
- enum: ["staging", "production"],
20276
+ description: "\u9009\u62E9\u5BF9\u63A5\u7684\u670D\u52A1\u5668\u73AF\u5883\u3002test = \u6D4B\u8BD5\u73AF\u5883\uFF0Cstaging = \u8054\u8C03\u73AF\u5883\uFF0Cproduction = \u7EBF\u4E0A\u73AF\u5883",
20277
+ enum: ["test", "staging", "production"],
20269
20278
  default: "production"
20270
20279
  },
20271
20280
  encryptionMode: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "liangzimixin",
3
- "version": "0.3.56",
3
+ "version": "0.3.57",
4
4
  "description": "Quantum-encrypted IM channel plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",