forge-openclaw-plugin 0.2.103 → 0.2.104

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.
@@ -968,8 +968,24 @@ function processWatchCommand(pairing, command) {
968
968
  }
969
969
  case "capture_event": {
970
970
  const rawPayload = command.payload;
971
+ const reservedCapturePayloadKeys = new Set([
972
+ "eventType",
973
+ "recordedAt",
974
+ "promptId",
975
+ "linkedContext",
976
+ "placeId",
977
+ "stayId",
978
+ "tripId",
979
+ "workoutId"
980
+ ]);
981
+ const eventPayload = typeof rawPayload.payload === "object" &&
982
+ rawPayload.payload != null &&
983
+ Array.isArray(rawPayload.payload) === false
984
+ ? rawPayload.payload
985
+ : Object.fromEntries(Object.entries(rawPayload).filter(([key]) => !reservedCapturePayloadKeys.has(key)));
971
986
  const payload = captureCommandPayloadSchema.parse({
972
987
  ...rawPayload,
988
+ payload: eventPayload,
973
989
  linkedContext: typeof rawPayload.linkedContext === "object" &&
974
990
  rawPayload.linkedContext != null &&
975
991
  Array.isArray(rawPayload.linkedContext) === false
@@ -1101,6 +1117,15 @@ function commandErrorPayload(error) {
1101
1117
  message: error instanceof Error ? error.message : "Unknown watch command error"
1102
1118
  };
1103
1119
  }
1120
+ function isPermanentWatchCommandError(error) {
1121
+ if (error instanceof ZodError) {
1122
+ return true;
1123
+ }
1124
+ if (error instanceof HttpError) {
1125
+ return error.statusCode >= 400 && error.statusCode < 500;
1126
+ }
1127
+ return false;
1128
+ }
1104
1129
  export function ingestWatchCommandBatch(pairing, input) {
1105
1130
  assertWatchReady(pairing);
1106
1131
  const parsed = mobileWatchCommandBatchSchema.parse(input);
@@ -1126,6 +1151,9 @@ export function ingestWatchCommandBatch(pairing, input) {
1126
1151
  }));
1127
1152
  }
1128
1153
  catch (error) {
1154
+ if (!isPermanentWatchCommandError(error)) {
1155
+ throw error;
1156
+ }
1129
1157
  const errorPayload = commandErrorPayload(error);
1130
1158
  receipts.push(writeActionReceipt(pairing, command, {
1131
1159
  status: "failed",
@@ -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.103",
5
+ "version": "0.2.104",
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.103",
3
+ "version": "0.2.104",
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",