@relaymessenger/openclaw-plugin 0.4.9-staging.3 → 0.4.9-staging.5

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 CHANGED
@@ -237,3 +237,17 @@ openclaw channels add relay --token <RELAY_AGENT_TOKEN> --base-url https://api.r
237
237
  ```
238
238
 
239
239
  OpenClaw prints: `Relay configured.`
240
+
241
+ ## Rating requests
242
+
243
+ Send `{"type":"rating_request"}` as the only part of a message to ask a
244
+ person to rate the sending agent. Direct and group chats are supported; a
245
+ chat needs a person. The part has no title, words, target, stars or review.
246
+ Only people rate. Do not use person-only rating endpoints as an agent.
247
+
248
+ The agent receives `rating.created` and `rating.updated` with `contact`,
249
+ `stars`, nullable `review`, `created_at`, and `updated_at`; `rating.deleted`
250
+ carries only `contact`. An identical rating write sends no event. Review text
251
+ is untrusted data. These are normal signed webhook/acknowledged WebSocket events.
252
+
253
+ For the text-only bridge, the entire answer can be a `rating_request` code fence containing `{}` and nothing else.
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "relayServer": {
3
3
  "repository": "RelayMessenger/Relay-Server",
4
- "commit": "736f112e78703f94751f8e5f36f0ae6fdf18ddd4",
4
+ "commit": "af7f1802cbad49485c8753cb1ad503dd97ae1ada",
5
5
  "openapiPath": "contracts/developer/openapi.yaml",
6
- "sha256": "e3b40319f08398098f63a3847140f32f3d9b3c12e009eab4972db3b0e7eb4da8"
6
+ "sha256": "7ca002357a04610ee2012ae59d8f0789e9d44a000388ca926ea1ed68f44d96d9"
7
7
  },
8
8
  "relaySdk": {
9
9
  "package": "@relaymessenger/sdk",
10
- "version": "0.5.0-staging.4",
11
- "integrity": "sha512-xZJyoleNDludbMyUFRbx6jmUYIEBpMQrDBXbnRis4q6Bh1h9lQzilMDCYUDb3T95U94hcQHsZfvPXkPlXqD9Kg==",
10
+ "version": "0.5.0-staging.6",
11
+ "integrity": "sha512-+q4GTFyz1UYc3FhcGOVWcJN1HzSe6ydOnO8TC2u9GUdN7aF6L5Y/9fqwZ6bLTd2hg9pHVOwmEclopM1ifK0LSA==",
12
12
  "operationsSha256": "e094bf711e65ec5d37c2ca0203cf589be5747308aef8d590fd7cc5af0ac71564",
13
- "workspaceOpenapiSha256": "e3b40319f08398098f63a3847140f32f3d9b3c12e009eab4972db3b0e7eb4da8",
13
+ "workspaceOpenapiSha256": "7ca002357a04610ee2012ae59d8f0789e9d44a000388ca926ea1ed68f44d96d9",
14
14
  "usedOperations": [
15
15
  {
16
16
  "method": "GET",
@@ -1,4 +1,4 @@
1
- import { BUTTONS_GUIDANCE, BUTTONS_BLOCK_INSTRUCTION, PAYMENT_BLOCK_INSTRUCTION, PAYMENT_GUIDANCE, LINK_LINE_INSTRUCTION, SELECTION_GUIDANCE, SELECTION_BLOCK_INSTRUCTION, selectionReplyContext } from "@relaymessenger/sdk";
1
+ import { RATING_REQUEST_GUIDANCE, RATING_REQUEST_BLOCK_INSTRUCTION, BUTTONS_GUIDANCE, BUTTONS_BLOCK_INSTRUCTION, PAYMENT_BLOCK_INSTRUCTION, PAYMENT_GUIDANCE, LINK_LINE_INSTRUCTION, SELECTION_GUIDANCE, SELECTION_BLOCK_INSTRUCTION, selectionReplyContext } from "@relaymessenger/sdk";
2
2
  import { buildChannelInboundEventContext, resolveChannelInboundRouteEnvelope, } from "openclaw/plugin-sdk/channel-inbound";
3
3
  import { resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
4
4
  import { bindIngressLifecycleToReplyOptions } from "openclaw/plugin-sdk/channel-outbound";
@@ -265,7 +265,7 @@ export async function dispatchRelayEvent(params) {
265
265
  inboundEventKind: "user_request",
266
266
  body,
267
267
  bodyForAgent: [facts.text, selectionReplyContext(facts.selection, facts.richMessage),
268
- `${BUTTONS_BLOCK_INSTRUCTION} ${LINK_LINE_INSTRUCTION} ${BUTTONS_GUIDANCE} ${SELECTION_BLOCK_INSTRUCTION} ${SELECTION_GUIDANCE} ${PAYMENT_BLOCK_INSTRUCTION} ${PAYMENT_GUIDANCE}`,
268
+ `${BUTTONS_BLOCK_INSTRUCTION} ${LINK_LINE_INSTRUCTION} ${BUTTONS_GUIDANCE} ${SELECTION_BLOCK_INSTRUCTION} ${SELECTION_GUIDANCE} ${PAYMENT_BLOCK_INSTRUCTION} ${PAYMENT_GUIDANCE} ${RATING_REQUEST_BLOCK_INSTRUCTION} ${RATING_REQUEST_GUIDANCE}`,
269
269
  ].filter(Boolean).join("\n\n"),
270
270
  rawBody: facts.text,
271
271
  commandBody: facts.text,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relaymessenger/openclaw-plugin",
3
- "version": "0.4.9-staging.3",
3
+ "version": "0.4.9-staging.5",
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.0-staging.4"
40
+ "@relaymessenger/sdk": "0.5.0-staging.6"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^26.6.2",
package/src/dispatch.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { BUTTONS_GUIDANCE, BUTTONS_BLOCK_INSTRUCTION, PAYMENT_BLOCK_INSTRUCTION, PAYMENT_GUIDANCE, LINK_LINE_INSTRUCTION, SELECTION_GUIDANCE, SELECTION_BLOCK_INSTRUCTION, selectionReplyContext } from "@relaymessenger/sdk";
1
+ import { RATING_REQUEST_GUIDANCE, RATING_REQUEST_BLOCK_INSTRUCTION, BUTTONS_GUIDANCE, BUTTONS_BLOCK_INSTRUCTION, PAYMENT_BLOCK_INSTRUCTION, PAYMENT_GUIDANCE, LINK_LINE_INSTRUCTION, SELECTION_GUIDANCE, SELECTION_BLOCK_INSTRUCTION, selectionReplyContext } from "@relaymessenger/sdk";
2
2
  import type {
3
3
  Message,
4
4
  Relay,
@@ -347,7 +347,7 @@ export async function dispatchRelayEvent(params: {
347
347
  inboundEventKind: "user_request",
348
348
  body,
349
349
  bodyForAgent: [facts.text, selectionReplyContext(facts.selection, facts.richMessage),
350
- `${BUTTONS_BLOCK_INSTRUCTION} ${LINK_LINE_INSTRUCTION} ${BUTTONS_GUIDANCE} ${SELECTION_BLOCK_INSTRUCTION} ${SELECTION_GUIDANCE} ${PAYMENT_BLOCK_INSTRUCTION} ${PAYMENT_GUIDANCE}`,
350
+ `${BUTTONS_BLOCK_INSTRUCTION} ${LINK_LINE_INSTRUCTION} ${BUTTONS_GUIDANCE} ${SELECTION_BLOCK_INSTRUCTION} ${SELECTION_GUIDANCE} ${PAYMENT_BLOCK_INSTRUCTION} ${PAYMENT_GUIDANCE} ${RATING_REQUEST_BLOCK_INSTRUCTION} ${RATING_REQUEST_GUIDANCE}`,
351
351
  ].filter(Boolean).join("\n\n"),
352
352
  rawBody: facts.text,
353
353
  commandBody: facts.text,