larpaso-website/claude-remote/claude/postfach-hinweis.sh
Pascal Scholz 30418ea841 Add Claude remote-control stack with shared MCP mailbox
Containers for Pascal and Lara run claude remote-control per project
(larpaso, youtube) on the VPS, isolated from the web stack, and exchange
messages through a small MCP mailbox server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 19:25:54 +01:00

10 lines
664 B
Bash

#!/bin/sh
# Hook (SessionStart/UserPromptSubmit): meldet ungelesene Postfach-Nachrichten.
# Was hier auf stdout landet, sieht Claude als zusätzlichen Kontext.
json=$(curl -s --max-time 3 "http://postfach:8080/unread?user=${MAILBOX_USER}") || exit 0
count=$(printf '%s' "$json" | jq -r '.count // 0' 2>/dev/null) || exit 0
[ "$count" -gt 0 ] 2>/dev/null || exit 0
echo "Postfach: ${count} ungelesene Nachricht(en) von der anderen Person:"
printf '%s' "$json" | jq -r '.messages[] | "- [\(.id)] von \(.from), Projekt \(.project): \(.subject)"'
echo "Lies sie mit dem Tool read_messages (MCP-Server postfach), bevor du weitermachst, und berücksichtige sie."
exit 0