liangzimixin 0.3.94 → 0.3.95

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
@@ -33689,20 +33689,41 @@ var MessagePipe = class _MessagePipe {
33689
33689
  async _callMessageApiOnce(url2, body, logTag) {
33690
33690
  const apiStartMs = Date.now();
33691
33691
  const token2 = await this.tokenFn();
33692
- const resp = await fetch(url2, {
33692
+ const reqHeaders = {
33693
+ "Authorization": `Bearer ${token2}`,
33694
+ "Content-Type": "application/json"
33695
+ };
33696
+ log25.info(`${logTag}:DEBUG:request`, {
33697
+ url: url2,
33693
33698
  method: "POST",
33694
33699
  headers: {
33695
- "Authorization": `Bearer ${token2}`,
33700
+ Authorization: `Bearer ${token2.slice(0, 20)}...`,
33696
33701
  "Content-Type": "application/json"
33697
33702
  },
33703
+ tokenLength: token2.length
33704
+ });
33705
+ const resp = await fetch(url2, {
33706
+ method: "POST",
33707
+ headers: reqHeaders,
33698
33708
  body: JSON.stringify(body)
33699
33709
  });
33700
33710
  if (!resp.ok) {
33711
+ let respBody = "";
33712
+ try {
33713
+ respBody = (await resp.clone().text()).slice(0, 500);
33714
+ } catch {
33715
+ }
33716
+ const respHeaders = {};
33717
+ resp.headers.forEach((v, k) => {
33718
+ respHeaders[k] = v;
33719
+ });
33701
33720
  log25.error(`${logTag}:http-error`, {
33702
33721
  status: resp.status,
33703
33722
  statusText: resp.statusText,
33704
33723
  url: url2,
33705
- body
33724
+ body,
33725
+ responseHeaders: respHeaders,
33726
+ responseBody: respBody
33706
33727
  });
33707
33728
  if (resp.status === 401 && this.invalidateTokenFn) {
33708
33729
  log25.warn(`${logTag}:token-expired, invalidating cached token for retry`);
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "liangzimixin",
3
- "version": "0.3.94",
3
+ "version": "0.3.95",
4
4
  "description": "Quantum-encrypted IM channel plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "index.cjs",
@@ -32554,20 +32554,41 @@ var MessagePipe = class _MessagePipe {
32554
32554
  async _callMessageApiOnce(url2, body, logTag) {
32555
32555
  const apiStartMs = Date.now();
32556
32556
  const token2 = await this.tokenFn();
32557
- const resp = await fetch(url2, {
32557
+ const reqHeaders = {
32558
+ "Authorization": `Bearer ${token2}`,
32559
+ "Content-Type": "application/json"
32560
+ };
32561
+ log16.info(`${logTag}:DEBUG:request`, {
32562
+ url: url2,
32558
32563
  method: "POST",
32559
32564
  headers: {
32560
- "Authorization": `Bearer ${token2}`,
32565
+ Authorization: `Bearer ${token2.slice(0, 20)}...`,
32561
32566
  "Content-Type": "application/json"
32562
32567
  },
32568
+ tokenLength: token2.length
32569
+ });
32570
+ const resp = await fetch(url2, {
32571
+ method: "POST",
32572
+ headers: reqHeaders,
32563
32573
  body: JSON.stringify(body)
32564
32574
  });
32565
32575
  if (!resp.ok) {
32576
+ let respBody = "";
32577
+ try {
32578
+ respBody = (await resp.clone().text()).slice(0, 500);
32579
+ } catch {
32580
+ }
32581
+ const respHeaders = {};
32582
+ resp.headers.forEach((v, k) => {
32583
+ respHeaders[k] = v;
32584
+ });
32566
32585
  log16.error(`${logTag}:http-error`, {
32567
32586
  status: resp.status,
32568
32587
  statusText: resp.statusText,
32569
32588
  url: url2,
32570
- body
32589
+ body,
32590
+ responseHeaders: respHeaders,
32591
+ responseBody: respBody
32571
32592
  });
32572
32593
  if (resp.status === 401 && this.invalidateTokenFn) {
32573
32594
  log16.warn(`${logTag}:token-expired, invalidating cached token for retry`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "liangzimixin",
3
- "version": "0.3.94",
3
+ "version": "0.3.95",
4
4
  "description": "Quantum-encrypted IM channel plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -18,7 +18,7 @@ REM liangzimixin install script (Windows)
18
18
  REM Usage: liangzimixin_install.bat <appId> <appSecret> [quantumAccount]
19
19
  REM ============================================================
20
20
 
21
- set "SCRIPT_VERSION=0.3.94"
21
+ set "SCRIPT_VERSION=0.3.95"
22
22
  set "NPM_PACKAGE=liangzimixin"
23
23
 
24
24
  set "SKIP_SELF_UPDATE=0"
@@ -14,7 +14,7 @@ echo -e "\033[0;36m▸\033[0m Deployment log will be saved to $LOG_FILE"
14
14
  # 用法: ./liangzimixin_install.sh <appId> <appSecret> [quantumAccount]
15
15
  # ============================================================
16
16
 
17
- SCRIPT_VERSION="0.3.94"
17
+ SCRIPT_VERSION="0.3.95"
18
18
  NPM_PACKAGE="liangzimixin"
19
19
 
20
20
  # ── 颜色 ──────────────────────────────────────────────────────