forge-openclaw-plugin 0.2.81 → 0.2.82

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.
@@ -1,5 +1,5 @@
1
1
  import { createHash, randomUUID } from "node:crypto";
2
- import { inflateSync } from "node:zlib";
2
+ import { inflateRawSync, inflateSync } from "node:zlib";
3
3
  import { z } from "zod";
4
4
  import { getDatabase, runInTransaction } from "./db.js";
5
5
  import { HttpError } from "./errors.js";
@@ -2754,9 +2754,7 @@ function parseDeflateBase64ChunkPayload(payloadJsonDeflateBase64, context) {
2754
2754
  }
2755
2755
  let decoded;
2756
2756
  try {
2757
- decoded = inflateSync(compressed, {
2758
- maxOutputLength: HEALTH_MOBILE_SYNC_CHUNK_MAX_BYTES + 1
2759
- });
2757
+ decoded = inflateHealthSyncChunkPayload(compressed);
2760
2758
  }
2761
2759
  catch (error) {
2762
2760
  const errorCode = typeof error === "object" && error !== null && "code" in error
@@ -2805,6 +2803,21 @@ function parseDeflateBase64ChunkPayload(payloadJsonDeflateBase64, context) {
2805
2803
  mode: HEALTH_MOBILE_SYNC_COMPRESSED_CHUNK_PAYLOAD_ENCODING
2806
2804
  };
2807
2805
  }
2806
+ function inflateHealthSyncChunkPayload(compressed) {
2807
+ const options = { maxOutputLength: HEALTH_MOBILE_SYNC_CHUNK_MAX_BYTES + 1 };
2808
+ try {
2809
+ return inflateSync(compressed, options);
2810
+ }
2811
+ catch (error) {
2812
+ const errorCode = typeof error === "object" && error !== null && "code" in error
2813
+ ? error.code
2814
+ : undefined;
2815
+ if (errorCode === "ERR_BUFFER_TOO_LARGE") {
2816
+ throw error;
2817
+ }
2818
+ return inflateRawSync(compressed, options);
2819
+ }
2820
+ }
2808
2821
  function resolveChunkWirePayload(parsed, syncSessionId, rawPayloadJson) {
2809
2822
  if (parsed.payloadJsonDeflateBase64) {
2810
2823
  return parseDeflateBase64ChunkPayload(parsed.payloadJsonDeflateBase64, {
@@ -2,7 +2,7 @@
2
2
  "id": "forge-openclaw-plugin",
3
3
  "name": "Forge",
4
4
  "description": "Curated OpenClaw adapter for the Forge collaboration API, UI entrypoint, and localhost auto-start runtime.",
5
- "version": "0.2.81",
5
+ "version": "0.2.82",
6
6
  "activation": {
7
7
  "onStartup": true,
8
8
  "onCapabilities": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forge-openclaw-plugin",
3
- "version": "0.2.81",
3
+ "version": "0.2.82",
4
4
  "description": "Curated OpenClaw adapter for the Forge collaboration API, UI entrypoint, and localhost auto-start runtime.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",