feat(sessions): add agent-to-agent post step

This commit is contained in:
Peter Steinberger
2026-01-04 03:04:55 +01:00
parent 052cec70ae
commit add1301a51
11 changed files with 295 additions and 11 deletions

View File

@@ -75,6 +75,12 @@ Behavior:
- If wait times out: `{ runId, status: "timeout", error }`. Run continues; call `sessions_history` later.
- If the run fails: `{ runId, status: "error", error }`.
- Waits via gateway `agent.wait` (server-side) so reconnects don't drop the wait.
- Agent-to-agent message context is injected for the primary run.
- After the primary run completes, Clawdis starts an **agent-to-agent post step**:
- The agent can reply with the announcement to post to the target session.
- To stay silent, reply exactly `ANNOUNCE_SKIP`.
- Any other reply is sent to the target channel.
- The post step includes the original request and round1 reply in context.
## Provider Field
- For groups, `provider` is the `surface` recorded on the session entry.

View File

@@ -119,6 +119,7 @@ Notes:
- `main` is the canonical direct-chat key; global/unknown are hidden.
- `messageLimit > 0` fetches last N messages per session (tool messages filtered).
- `sessions_send` waits for final completion when `timeoutSeconds > 0`.
- `sessions_send` always runs a followup **agenttoagent post step**; reply `ANNOUNCE_SKIP` to suppress the announcement.
### `discord`
Send Discord reactions, stickers, or polls.