@relaymessenger/openclaw-plugin 0.4.13 → 0.4.14-staging.0

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.
@@ -7,8 +7,8 @@
7
7
  },
8
8
  "relaySdk": {
9
9
  "package": "@relaymessenger/sdk",
10
- "version": "0.5.4",
11
- "integrity": "sha512-MwQKqzkvKMfK0uHRkR7TkGErE2RMAMcqWts4bGodyYwTSpXV3NRw13H9CgYpPjqt25uyCYNA29Tz2PCxreZ/ig==",
10
+ "version": "0.5.5-staging.0",
11
+ "integrity": "sha512-sLUZjL3AAmrmiy5ooI0/Y5hq3Vb6V8L0BiQCIQLI0GS7AiZwN+XOE315Agm5i6WkfMMHGtow0l0VmRtn00zBWQ==",
12
12
  "operationsSha256": "e094bf711e65ec5d37c2ca0203cf589be5747308aef8d590fd7cc5af0ac71564",
13
13
  "workspaceOpenapiSha256": "79bd85b0150ef45ea4bbe5f498507dd86d784e7fbf6c3b299a5a81db091aacdd",
14
14
  "usedOperations": [
@@ -1,4 +1,4 @@
1
- import { RelayWebhookConfiguredError, } from "@relaymessenger/sdk";
1
+ import { RelayAPIError, RelayWebhookConfiguredError, } from "@relaymessenger/sdk";
2
2
  import { createHash } from "node:crypto";
3
3
  import { dispatchRelayEvent } from "./dispatch.js";
4
4
  import { commitRelayFullSync } from "./full-sync.js";
@@ -135,7 +135,11 @@ export async function startRelayAccount(ctx) {
135
135
  catch (error) {
136
136
  if (abortSignal.aborted)
137
137
  return;
138
- if (error instanceof RelayWebhookConfiguredError) {
138
+ // Both need the operator: a restart would meet the same webhook, or the
139
+ // same refused Agent Token (HTTP 401), every time. terminalDisconnect
140
+ // stops OpenClaw's auto-restart (server-channels.ts).
141
+ if (error instanceof RelayWebhookConfiguredError
142
+ || (error instanceof RelayAPIError && error.status === 401)) {
139
143
  ctx.setStatus({
140
144
  accountId: account.accountId,
141
145
  running: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relaymessenger/openclaw-plugin",
3
- "version": "0.4.13",
3
+ "version": "0.4.14-staging.0",
4
4
  "description": "Native Relay channel plugin for OpenClaw",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -37,7 +37,7 @@
37
37
  "prepack": "npm run build"
38
38
  },
39
39
  "dependencies": {
40
- "@relaymessenger/sdk": "0.5.4"
40
+ "@relaymessenger/sdk": "0.5.5-staging.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^26.6.2",
package/src/gateway.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  type Relay,
3
+ RelayAPIError,
3
4
  RelayWebhookConfiguredError,
4
5
  type RelayWebhookEvent,
5
6
  } from "@relaymessenger/sdk";
@@ -177,7 +178,13 @@ export async function startRelayAccount(
177
178
  });
178
179
  } catch (error) {
179
180
  if (abortSignal.aborted) return;
180
- if (error instanceof RelayWebhookConfiguredError) {
181
+ // Both need the operator: a restart would meet the same webhook, or the
182
+ // same refused Agent Token (HTTP 401), every time. terminalDisconnect
183
+ // stops OpenClaw's auto-restart (server-channels.ts).
184
+ if (
185
+ error instanceof RelayWebhookConfiguredError
186
+ || (error instanceof RelayAPIError && error.status === 401)
187
+ ) {
181
188
  ctx.setStatus({
182
189
  accountId: account.accountId,
183
190
  running: false,