liangzimixin 0.2.16 → 0.2.18

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
@@ -17497,8 +17497,7 @@ var DEFAULT_INTERNAL_CONFIG = {
17497
17497
  refreshAheadMs: 3e5
17498
17498
  },
17499
17499
  crypto: {
17500
- enabled: false,
17501
- // 暂时关闭量子加密 (SDK 尚未部署到生产环境)
17500
+ enabled: true,
17502
17501
  keySource: "env",
17503
17502
  envKey: "QUANTUM_ENCRYPTION_KEY"
17504
17503
  },
@@ -18975,7 +18974,12 @@ var CryptoEngine = class _CryptoEngine {
18975
18974
  return;
18976
18975
  }
18977
18976
  if (!this.plug) {
18978
- throw new Error("Quantum encryption SDK is missing. Cannot initialize in encryption mode (check dist/index.min.cjs).");
18977
+ log16.warn(
18978
+ "Quantum encryption SDK is missing \u2014 automatically falling back to passthrough mode. Messages will NOT be encrypted. Deploy sdk/index.min.cjs to enable encryption."
18979
+ );
18980
+ this.passthrough = true;
18981
+ this.initialized = true;
18982
+ return;
18979
18983
  }
18980
18984
  if (this.credentials) {
18981
18985
  writeQuantumConfig(this.credentials);
@@ -20509,7 +20513,7 @@ async function startPlugin(accountConfig, internalOverrides) {
20509
20513
  };
20510
20514
  }
20511
20515
  var plugin = {
20512
- id: PLUGIN_ID,
20516
+ id: CHANNEL_ID,
20513
20517
  name: "\u91CF\u5B50\u5BC6\u4FE1",
20514
20518
  description: "Quantum-encrypted IM channel plugin",
20515
20519
  register(api) {
package/dist/index.d.cts CHANGED
@@ -316,7 +316,7 @@ declare class CryptoEngine {
316
316
  /** SDK 是否已完成初始化 */
317
317
  private initialized;
318
318
  /** 是否为透传模式 (不加密, 明文直接透传) */
319
- private readonly passthrough;
319
+ private passthrough;
320
320
  /** 用户凭据 — 用于生成 quantum.json (透传模式下为 undefined) */
321
321
  private readonly credentials?;
322
322
  /**
@@ -18053,8 +18053,7 @@ var DEFAULT_INTERNAL_CONFIG = {
18053
18053
  refreshAheadMs: 3e5
18054
18054
  },
18055
18055
  crypto: {
18056
- enabled: false,
18057
- // 暂时关闭量子加密 (SDK 尚未部署到生产环境)
18056
+ enabled: true,
18058
18057
  keySource: "env",
18059
18058
  envKey: "QUANTUM_ENCRYPTION_KEY"
18060
18059
  },
@@ -18187,7 +18186,12 @@ var CryptoEngine = class _CryptoEngine {
18187
18186
  return;
18188
18187
  }
18189
18188
  if (!this.plug) {
18190
- throw new Error("Quantum encryption SDK is missing. Cannot initialize in encryption mode (check dist/index.min.cjs).");
18189
+ log7.warn(
18190
+ "Quantum encryption SDK is missing \u2014 automatically falling back to passthrough mode. Messages will NOT be encrypted. Deploy sdk/index.min.cjs to enable encryption."
18191
+ );
18192
+ this.passthrough = true;
18193
+ this.initialized = true;
18194
+ return;
18191
18195
  }
18192
18196
  if (this.credentials) {
18193
18197
  writeQuantumConfig(this.credentials);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "liangzimixin",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "description": "Quantum-encrypted IM channel plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",