liangzimixin 0.3.55 → 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();
@@ -18754,6 +18762,13 @@ var InboundPipeline = class {
18754
18762
  cfg: this.deps.sdkConfig,
18755
18763
  dispatcherOptions: {
18756
18764
  deliver: async (payload2) => {
18765
+ log12.debug("\u{1F527} \u547D\u4EE4 deliver \u56DE\u8C03\u6536\u5230", {
18766
+ messageId: msg.messageId,
18767
+ hasText: Boolean(payload2.text),
18768
+ textLength: payload2.text?.length ?? 0,
18769
+ textPreview: (payload2.text ?? "").slice(0, 200),
18770
+ payloadKeys: Object.keys(payload2)
18771
+ });
18757
18772
  const text = (payload2.text ?? "").trim();
18758
18773
  if (!text) return;
18759
18774
  await this.deps.messagePipe.sendMessage({
@@ -18910,8 +18925,8 @@ var QUANTUM_IM_CONFIG_JSON_SCHEMA = {
18910
18925
  env: {
18911
18926
  type: "string",
18912
18927
  title: "\u90E8\u7F72\u73AF\u5883",
18913
- description: "\u9009\u62E9\u5BF9\u63A5\u7684\u670D\u52A1\u5668\u73AF\u5883\u3002staging = \u8054\u8C03\u73AF\u5883\uFF0Cproduction = \u7EBF\u4E0A\u73AF\u5883",
18914
- 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"],
18915
18930
  default: "production"
18916
18931
  },
18917
18932
  encryptionMode: {
@@ -19323,6 +19338,7 @@ var import_node_fs = require("fs");
19323
19338
  var import_node_path = require("path");
19324
19339
  var log14 = createLogger("crypto/quantum-plug");
19325
19340
  var KMS_URLS = {
19341
+ test: "http://223.244.14.238:8552",
19326
19342
  staging: "http://223.244.14.238:8552",
19327
19343
  production: "https://cmsp.zdxlz.com:8552"
19328
19344
  };
@@ -19421,7 +19437,7 @@ var CryptoEngine = class _CryptoEngine {
19421
19437
  * 构造加密引擎 (加密模式)
19422
19438
  *
19423
19439
  * @param credentials - 量子 SDK 所需的凭据
19424
- * @param env - 部署环境 ('staging' | 'production')
19440
+ * @param env - 部署环境 ('test' | 'staging' | 'production')
19425
19441
  */
19426
19442
  constructor(credentials, env = "production") {
19427
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: {
@@ -20780,6 +20789,13 @@ var InboundPipeline = class {
20780
20789
  cfg: this.deps.sdkConfig,
20781
20790
  dispatcherOptions: {
20782
20791
  deliver: async (payload2) => {
20792
+ log24.debug("\u{1F527} \u547D\u4EE4 deliver \u56DE\u8C03\u6536\u5230", {
20793
+ messageId: msg.messageId,
20794
+ hasText: Boolean(payload2.text),
20795
+ textLength: payload2.text?.length ?? 0,
20796
+ textPreview: (payload2.text ?? "").slice(0, 200),
20797
+ payloadKeys: Object.keys(payload2)
20798
+ });
20783
20799
  const text = (payload2.text ?? "").trim();
20784
20800
  if (!text) return;
20785
20801
  await this.deps.messagePipe.sendMessage({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "liangzimixin",
3
- "version": "0.3.55",
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",