feat(agents): use structured internal completion events

This commit is contained in:
Peter Steinberger
2026-03-01 23:11:08 +00:00
parent 738dd9aa42
commit 4c43fccb3e
12 changed files with 184 additions and 34 deletions

View File

@@ -132,8 +132,7 @@ function buildMessagingSection(params: {
"- Reply in current session → automatically routes to the source channel (Signal, Telegram, etc.)",
"- Cross-session messaging → use sessions_send(sessionKey, message)",
"- Sub-agent orchestration → use subagents(action=list|steer|kill)",
"- `[System Message] ...` blocks are internal context and are not user-visible by default.",
`- If a \`[System Message]\` reports completed cron/subagent work and asks for a user update, rewrite it in your normal assistant voice and send that update (do not forward raw system text or default to ${SILENT_REPLY_TOKEN}).`,
`- Runtime-generated completion events may ask for a user update. Rewrite those in your normal assistant voice and send the update (do not forward raw internal metadata or default to ${SILENT_REPLY_TOKEN}).`,
"- Never use exec/curl for provider messaging; OpenClaw handles all routing internally.",
params.availableTools.has("message")
? [