Support multiple notification platforms, gracefully handle 'none'
This commit is contained in:
parent
a77e1c3efb
commit
1541a6c238
1 changed files with 25 additions and 4 deletions
29
SKILL.md
29
SKILL.md
|
|
@ -98,14 +98,25 @@ Use SSH-MCP (`mcp_ssh_execute_command`):
|
|||
cd ~ && tar xzf YYYY-MM-DD-<topic>.tar.gz
|
||||
```
|
||||
|
||||
### Step 8: Create a one-shot cron job on the recipient server
|
||||
### Step 8: Create notification for the recipient
|
||||
|
||||
Check the recipient's `Notification` field in AGENTS.md:
|
||||
|
||||
| Notification | Action |
|
||||
|--------------|--------|
|
||||
| `discord` | Use `--deliver discord` |
|
||||
| `telegram` | Use `--deliver telegram` |
|
||||
| `slack` | Use `--deliver slack` |
|
||||
| `none` | Skip cron notification, warn sender |
|
||||
|
||||
**If recipient has a notification platform:**
|
||||
|
||||
Use SSH-MCP to run:
|
||||
|
||||
```bash
|
||||
hermes cron create \
|
||||
--name "transfer-ack-<topic>" \
|
||||
--deliver discord \
|
||||
--deliver <platform> \
|
||||
--repeat 1 \
|
||||
1m \
|
||||
"New transfer packet from <SENDER_NAME>. Please read ~/YYYY-MM-DD-<topic>/LETTER.md and follow the instructions inside."
|
||||
|
|
@ -114,9 +125,18 @@ hermes cron create \
|
|||
This creates a one-shot cron job that:
|
||||
- Runs in ~1 minute
|
||||
- Triggers the recipient agent with the notification prompt
|
||||
- Delivers the response to Discord
|
||||
- Delivers the response to the specified platform
|
||||
- Auto-removes after running once (`--repeat 1`)
|
||||
|
||||
**If recipient has `Notification: none`:**
|
||||
|
||||
Skip the cron job. Inform the sender:
|
||||
```
|
||||
Recipient <RECIPIENT_NAME> has no notification platform configured.
|
||||
Packet delivered to ~/YYYY-MM-DD-<topic>/LETTER.md but no automatic notification sent.
|
||||
You may need to manually notify the recipient.
|
||||
```
|
||||
|
||||
**Note:** The cron ticker runs at 60s intervals, so it may take 1-2 minutes for the job to fire.
|
||||
|
||||
### Step 9: Confirm to user
|
||||
|
|
@ -139,13 +159,14 @@ The recipient should clean up their copy after reading the letter.
|
|||
|
||||
## Pitfalls
|
||||
|
||||
- **Do NOT use `hermes -z` or `hermes chat -q`** — those output to stdout only, not Discord. Always use the cron mechanism with `--deliver discord`.
|
||||
- **Do NOT use `hermes -z` or `hermes chat -q`** — those output to stdout only, not Discord. Always use the cron mechanism with `--deliver <platform>`.
|
||||
- **Do NOT try to message the recipient's Discord bot directly** — Discord bots cannot see messages from other bots.
|
||||
- **The `--repeat 1` flag is required** — without it, the job runs indefinitely.
|
||||
- **Schedule format:** Use `1m` (relative offset), not `now`. The cron ticker picks it up on the next tick.
|
||||
- **SCP requires SSH key auth** — ensure `~/.ssh/authorized_keys` is set up on the recipient server for the sending agent's key.
|
||||
- **Files must be in the tarball** — don't assume the recipient has access to your filesystem. Copy everything into the packet directory.
|
||||
- **Hardcoded names** — always derive SENDER_NAME, RECIPIENT_NAME, and USER_NAME from context or AGENTS.md, never hardcode them.
|
||||
- **Notification platform** — check AGENTS.md for the recipient's `Notification` field. Use the corresponding `--deliver` flag. If `none`, skip the cron job and warn the sender.
|
||||
|
||||
## Integration with agent-coordination
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue