@relaymessenger/openclaw-plugin 0.4.1-staging.1 → 0.4.1-staging.3
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/README.md +8 -7
- package/contracts/relay-v1.lock.json +5 -5
- package/dist/src/inbound.js +4 -3
- package/package.json +2 -2
- package/src/inbound.ts +6 -3
package/README.md
CHANGED
|
@@ -67,12 +67,13 @@ default account. Every named account must set its own inline token or
|
|
|
67
67
|
- A **Chat** is direct or group.
|
|
68
68
|
- A **Message** belongs to one Chat and contains ordered parts.
|
|
69
69
|
|
|
70
|
-
The plugin starts OpenClaw turns for
|
|
70
|
+
The plugin starts OpenClaw turns for inbound user- or agent-authored
|
|
71
71
|
`message.received` event in a direct Chat. In a group Chat, it starts a turn
|
|
72
72
|
only when a text part's canonical `mention` Handle matches the canonical
|
|
73
73
|
`chat.owner_handle`, or when `reply_to.message_id` resolves through Relay to a
|
|
74
74
|
Message authored by this agent in the same Chat. Visible `@handle` text is not
|
|
75
|
-
parsed as a mention.
|
|
75
|
+
parsed as a mention. Both sender kinds pass the same `allowFrom` checks.
|
|
76
|
+
Unmentioned group traffic, outbound self echoes,
|
|
76
77
|
reactions, typing events, receipts, and membership events are durably accepted
|
|
77
78
|
without starting a turn.
|
|
78
79
|
|
|
@@ -101,9 +102,9 @@ Handles:
|
|
|
101
102
|
}
|
|
102
103
|
```
|
|
103
104
|
|
|
104
|
-
Without `allowFrom`, any user Contact whose Message Relay delivers
|
|
105
|
-
agent can start a direct turn, while the group activation rules above
|
|
106
|
-
apply.
|
|
105
|
+
Without `allowFrom`, any user or agent Contact whose Message Relay delivers
|
|
106
|
+
to this agent can start a direct turn, while the group activation rules above
|
|
107
|
+
still apply.
|
|
107
108
|
|
|
108
109
|
## Durable delivery
|
|
109
110
|
|
|
@@ -161,8 +162,8 @@ durable ACK and idempotent REST reply.
|
|
|
161
162
|
|
|
162
163
|
`contracts/relay-v1.lock.json` records the compatibility boundary used by this
|
|
163
164
|
candidate: Relay Server commit
|
|
164
|
-
`
|
|
165
|
-
`
|
|
165
|
+
`5607d9f73d99eef3da6c5dc0b1066f91e602b337`, OpenAPI SHA-256
|
|
166
|
+
`7094178cb01c0ddc05f9254dc91094900a0a7b6273979c0cad6257eec486f0d8`,
|
|
166
167
|
public `ChatHandle.image_url` and `ChatHandle.about` fields with no legacy
|
|
167
168
|
aliases,
|
|
168
169
|
and the exact `@relaymessenger/sdk@0.3.0-staging.8` registry integrity, source
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"relayServer": {
|
|
3
3
|
"repository": "RelayMessenger/Relay-Server",
|
|
4
|
-
"commit": "
|
|
4
|
+
"commit": "5607d9f73d99eef3da6c5dc0b1066f91e602b337",
|
|
5
5
|
"openapiPath": "contracts/developer/openapi.yaml",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "7094178cb01c0ddc05f9254dc91094900a0a7b6273979c0cad6257eec486f0d8"
|
|
7
7
|
},
|
|
8
8
|
"relaySdk": {
|
|
9
9
|
"package": "@relaymessenger/sdk",
|
|
10
|
-
"version": "0.3.1-staging.
|
|
11
|
-
"integrity": "sha512-
|
|
10
|
+
"version": "0.3.1-staging.2",
|
|
11
|
+
"integrity": "sha512-76hUul0ihr3Zyx3gN/DC4FG8nP+tKhWW1KkrZhgKlHiD7NYq5tg5Pn2mMPYSnoVA+I4OXNVoEGFY7XbIfU5wdg==",
|
|
12
12
|
"operationsSha256": "e06b2f44366b57dc1b5385b5b1f76585576f5bf9600d4bbe15e49cfdfb394996",
|
|
13
|
-
"workspaceOpenapiSha256": "
|
|
13
|
+
"workspaceOpenapiSha256": "7094178cb01c0ddc05f9254dc91094900a0a7b6273979c0cad6257eec486f0d8",
|
|
14
14
|
"usedOperations": [
|
|
15
15
|
{
|
|
16
16
|
"method": "GET",
|
package/dist/src/inbound.js
CHANGED
|
@@ -27,13 +27,14 @@ export function isRelayMessageReceivedEvent(event) {
|
|
|
27
27
|
Array.isArray(data.parts));
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Map
|
|
31
|
-
*
|
|
30
|
+
* Map inbound Messages from either contract-defined Contact kind. Sender
|
|
31
|
+
* authorization and direct/group activation remain the dispatcher's concern.
|
|
32
32
|
*/
|
|
33
33
|
export function buildRelayInboundFacts(event) {
|
|
34
34
|
if (!isRelayMessageReceivedEvent(event))
|
|
35
35
|
return null;
|
|
36
|
-
if (event.data.sender_handle.kind !== "user"
|
|
36
|
+
if (event.data.sender_handle.kind !== "user" &&
|
|
37
|
+
event.data.sender_handle.kind !== "agent")
|
|
37
38
|
return null;
|
|
38
39
|
const text = renderRelayMessageParts(event.data.parts);
|
|
39
40
|
if (!text.trim())
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@relaymessenger/openclaw-plugin",
|
|
3
|
-
"version": "0.4.1-staging.
|
|
3
|
+
"version": "0.4.1-staging.3",
|
|
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.3.1-staging.
|
|
40
|
+
"@relaymessenger/sdk": "0.3.1-staging.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^26.0.0",
|
package/src/inbound.ts
CHANGED
|
@@ -44,14 +44,17 @@ export function isRelayMessageReceivedEvent(
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* Map
|
|
48
|
-
*
|
|
47
|
+
* Map inbound Messages from either contract-defined Contact kind. Sender
|
|
48
|
+
* authorization and direct/group activation remain the dispatcher's concern.
|
|
49
49
|
*/
|
|
50
50
|
export function buildRelayInboundFacts(
|
|
51
51
|
event: RelayWebhookEvent,
|
|
52
52
|
): RelayInboundFacts | null {
|
|
53
53
|
if (!isRelayMessageReceivedEvent(event)) return null;
|
|
54
|
-
if (
|
|
54
|
+
if (
|
|
55
|
+
event.data.sender_handle.kind !== "user" &&
|
|
56
|
+
event.data.sender_handle.kind !== "agent"
|
|
57
|
+
) return null;
|
|
55
58
|
|
|
56
59
|
const text = renderRelayMessageParts(event.data.parts);
|
|
57
60
|
if (!text.trim()) return null;
|