grix-connector
Version:
Connect local AI coding agents (Claude, Codex, Gemini, Qwen, DeepSeek, Cursor, OpenCode, Pi, OpenHuman, Reasonix) to the Grix scheduling platform. Also serves as an OpenClaw plugin for Grix channel transport.
187 lines (136 loc) • 5.34 kB
Markdown
---
name: message-unsend
description: Silently recall/unsend already-sent messages. Supports current session and cross-session recall. After execution, must end immediately without replying any confirmation text. Trigger words: recall, unsend, delete message.
---
# Message Unsend Skill
This skill is used to recall already-sent messages through OpenClaw's `message` tool.
## Completion Contract (Highest Priority)
Once this skill is entered, the final output must satisfy these 4 conditions:
1. **Execute recall action first**: when the target message can be located, recall the target message first
2. **Recall the command message**: the current "recall/unsend" command message itself must also be recalled
3. **Never send confirmation text**: do not send "recalled", "recall successful", "processing complete", or any other message
4. **Only `NO_REPLY` is allowed at the end**: the skill must end by returning `NO_REPLY`
## Permission Control (Strict)
**This skill can only be executed when the current agent's owner, or an explicitly authorized operator in the current context, requests message recall.**
### Allowed Execution Cases
- Owner says "recall / unsend / delete message" in a private chat
- Owner says "recall / unsend / delete message" in a group chat
- Owner or explicitly authorized operator quotes a message requesting recall
### Prohibited Execution Cases
- A third-party user requests recall
- Requester identity is unclear, cannot determine if they are the owner / authorized operator
### Handling Recall Requests from Others
Completely ignore, do not reply, do not execute, directly `NO_REPLY`.
## Core Behavior: Completely Silent + Dual Recall
When the owner or explicitly authorized operator sends a recall command, must execute in order:
1. Recall the target message
2. Recall the command message
3. Immediately return `NO_REPLY`
Do not send any confirmation, error explanation, or supplementary notes.
## Two Recall Modes
### 1. Current Session Recall
If the target message is in the current Grix session, `messageId` must be provided; `sessionId` / `to` / `topic` can be omitted.
```json
{
"action": "unsend",
"channel": "grix",
"accountId": "{accountId}",
"messageId": "18889990099"
}
```
### 2. Cross-Session Recall
If the target message is not in the current session, prefer using `sessionId` to point to the target session. `to` and `topic` are only compatibility aliases; do not use them as the primary format.
```json
{
"action": "unsend",
"channel": "grix",
"accountId": "{accountId}",
"messageId": "18889990099",
"sessionId": "5c495569-ba1b-46ac-8070-5a1193a3f950"
}
```
## Parameter Rules
1. `messageId` is required and must be a numeric string
2. In the current Grix session, `sessionId` / `to` / `topic` can be omitted
3. For cross-session, prefer passing the exact `sessionId`
4. `to` / `topic` are only compatibility aliases; if using `topic`, pass the bare `session_id`
5. Do not hardcode `accountId=default`; always use the current exact account ID
## Use Cases
- User says "recall that last message" in the current conversation
- Need to silently clean up a message just sent by mistake
- Need to recall a known message cross-session
## Actual Call Examples
### Example 1: Current Session Recall
```json
{
"action": "unsend",
"channel": "grix",
"accountId": "{accountId}",
"messageId": "2033329436849868800"
}
```
### Example 2: Cross-Session Recall
```json
{
"action": "unsend",
"channel": "grix",
"accountId": "{accountId}",
"messageId": "2033474284277993472",
"sessionId": "5c495569-ba1b-46ac-8070-5a1193a3f950"
}
```
## Important Notes
1. The Grix channel can recall messages sent by both agents and users
2. For cross-session, must first obtain the exact target session; do not pass user ID, agent ID, or legacy other-channel session formats
3. `messageId` can be obtained from inbound context, previous send results, or message records
4. The current command message will also be silently recalled if it can be located
## Error Handling
Common errors are only for internal judgment; do not convert them into replies to the user:
- `messageId` does not exist: directly `NO_REPLY`
- Cannot resolve target session: directly `NO_REPLY`
- Insufficient permissions: directly `NO_REPLY`
- Message already deleted: directly `NO_REPLY`
## Grix Live Test Results (Updated 2026-03-16)
**Status**: Available
### Example: Recall a message sent by the agent
```json
{
"action": "unsend",
"channel": "grix",
"accountId": "primary",
"sessionId": "5c495569-ba1b-46ac-8070-5a1193a3f950",
"messageId": "2033371385615093760"
}
```
Return:
```json
{
"ok": true,
"deleted": true,
"unsent": true,
"messageId": "2033371385615093760",
"sessionId": "5c495569-ba1b-46ac-8070-5a1193a3f950"
}
```
### Example: Recall a message sent by the user
```json
{
"action": "unsend",
"channel": "grix",
"accountId": "primary",
"sessionId": "5c495569-ba1b-46ac-8070-5a1193a3f950",
"messageId": "2033474284277993472"
}
```
Return:
```json
{
"ok": true,
"deleted": true,
"unsent": true,
"messageId": "2033474284277993472",
"sessionId": "5c495569-ba1b-46ac-8070-5a1193a3f950"
}
```
## Closing Requirement
Once this skill is executed, the last line must be `NO_REPLY`. Do not leave any confirmation text.