forge-openclaw-plugin 0.2.72 → 0.2.73
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.
|
@@ -262,6 +262,11 @@ export const mobileHealthSyncSchema = z.object({
|
|
|
262
262
|
const HEALTH_MOBILE_SYNC_SCHEMA_VERSION = "healthkit-sync-v2";
|
|
263
263
|
const HEALTH_MOBILE_SYNC_CHUNK_TARGET_BYTES = 512_000;
|
|
264
264
|
const HEALTH_MOBILE_SYNC_CHUNK_MAX_BYTES = 1_000_000;
|
|
265
|
+
const HEALTH_MOBILE_SYNC_CHUNK_PAYLOAD_ENCODING = "payload_json_base64";
|
|
266
|
+
const HEALTH_MOBILE_SYNC_ACCEPTED_CHUNK_PAYLOAD_ENCODINGS = [
|
|
267
|
+
HEALTH_MOBILE_SYNC_CHUNK_PAYLOAD_ENCODING,
|
|
268
|
+
"legacy_payload_object"
|
|
269
|
+
];
|
|
265
270
|
const HEALTH_MOBILE_SYNC_SESSION_TTL_MS = 1000 * 60 * 60 * 24;
|
|
266
271
|
const mobileHealthSyncFamilySchema = z.enum([
|
|
267
272
|
"sleep_nights",
|
|
@@ -2830,6 +2835,8 @@ export function startMobileHealthSyncSession(payload) {
|
|
|
2830
2835
|
schemaVersion: HEALTH_MOBILE_SYNC_SCHEMA_VERSION,
|
|
2831
2836
|
chunkTargetBytes: HEALTH_MOBILE_SYNC_CHUNK_TARGET_BYTES,
|
|
2832
2837
|
chunkMaxBytes: HEALTH_MOBILE_SYNC_CHUNK_MAX_BYTES,
|
|
2838
|
+
chunkPayloadEncoding: HEALTH_MOBILE_SYNC_CHUNK_PAYLOAD_ENCODING,
|
|
2839
|
+
acceptedPayloadEncodings: HEALTH_MOBILE_SYNC_ACCEPTED_CHUNK_PAYLOAD_ENCODINGS,
|
|
2833
2840
|
supportsCompression: false,
|
|
2834
2841
|
acceptedFamilies: safeJsonParse(existing.requested_families_json, parsed.requestedFamilies),
|
|
2835
2842
|
receivedChunkIds
|
|
@@ -2857,6 +2864,8 @@ export function startMobileHealthSyncSession(payload) {
|
|
|
2857
2864
|
schemaVersion: HEALTH_MOBILE_SYNC_SCHEMA_VERSION,
|
|
2858
2865
|
chunkTargetBytes: HEALTH_MOBILE_SYNC_CHUNK_TARGET_BYTES,
|
|
2859
2866
|
chunkMaxBytes: HEALTH_MOBILE_SYNC_CHUNK_MAX_BYTES,
|
|
2867
|
+
chunkPayloadEncoding: HEALTH_MOBILE_SYNC_CHUNK_PAYLOAD_ENCODING,
|
|
2868
|
+
acceptedPayloadEncodings: HEALTH_MOBILE_SYNC_ACCEPTED_CHUNK_PAYLOAD_ENCODINGS,
|
|
2860
2869
|
supportsCompression: false,
|
|
2861
2870
|
acceptedFamilies: parsed.requestedFamilies,
|
|
2862
2871
|
receivedChunkIds: []
|
|
@@ -2908,7 +2917,16 @@ export function ingestMobileHealthSyncChunk(syncSessionId, payload, rawPayloadJs
|
|
|
2908
2917
|
clientByteCount: parsed.byteCount,
|
|
2909
2918
|
actualByteCount
|
|
2910
2919
|
});
|
|
2911
|
-
throw new HttpError(409, "chunk_checksum_mismatch", "The HealthKit sync chunk checksum does not match its payload.", {
|
|
2920
|
+
throw new HttpError(409, "chunk_checksum_mismatch", "The HealthKit sync chunk checksum does not match its payload.", {
|
|
2921
|
+
syncSessionId,
|
|
2922
|
+
chunkId: parsed.chunkId,
|
|
2923
|
+
family: parsed.family,
|
|
2924
|
+
actualBytes: actualByteCount,
|
|
2925
|
+
clientBytes: parsed.byteCount,
|
|
2926
|
+
clientChecksumPrefix: parsed.checksumSha256.slice(0, 12),
|
|
2927
|
+
serverChecksumPrefix: serverChecksum.slice(0, 12),
|
|
2928
|
+
mode: wirePayload.mode
|
|
2929
|
+
});
|
|
2912
2930
|
}
|
|
2913
2931
|
const now = nowIso();
|
|
2914
2932
|
getDatabase()
|
|
@@ -38,9 +38,17 @@ function sanitizeDiagnosticValue(value, depth = 0) {
|
|
|
38
38
|
return value.toISOString();
|
|
39
39
|
}
|
|
40
40
|
if (value instanceof Error) {
|
|
41
|
+
const richError = value;
|
|
41
42
|
return {
|
|
42
43
|
name: value.name,
|
|
43
44
|
message: value.message,
|
|
45
|
+
...(typeof richError.code === "string" ? { code: richError.code } : {}),
|
|
46
|
+
...(typeof richError.statusCode === "number"
|
|
47
|
+
? { statusCode: richError.statusCode }
|
|
48
|
+
: {}),
|
|
49
|
+
...(richError.details && typeof richError.details === "object"
|
|
50
|
+
? { details: sanitizeDiagnosticValue(richError.details, depth + 1) }
|
|
51
|
+
: {}),
|
|
44
52
|
stack: typeof value.stack === "string"
|
|
45
53
|
? sanitizeDiagnosticValue(value.stack, depth + 1)
|
|
46
54
|
: null
|
package/openclaw.plugin.json
CHANGED
|
@@ -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.
|
|
5
|
+
"version": "0.2.73",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onStartup": true,
|
|
8
8
|
"onCapabilities": [
|
package/package.json
CHANGED