Parent: #265
Goal
Add an agent context envelope and session state model so every Discord agent request carries stable source identifiers and can tie planning, confirmation, execution, memory lookup, and audit together through one operation_id.
Scope
- Add request fields for:
operation_id
- Discord
message_id
- Discord
channel_id
- Discord
thread_id
- optional parent message id
- response destination visibility
- Persist or pass session context for:
- original natural-language request
- proposed plan
- confirmation state
- tool results
- context sources used
- Ensure the Discord bot forwards enough metadata for backend policy decisions.
Acceptance criteria
- Agent requests include stable Discord source identifiers.
- Planning, confirmation, execution, and audit share the same
operation_id.
- The response destination is represented explicitly enough to prevent private context from being echoed into public channels.
- Tests cover context envelope serialization and validation.
Parent: #265
Goal
Add an agent context envelope and session state model so every Discord agent request carries stable source identifiers and can tie planning, confirmation, execution, memory lookup, and audit together through one
operation_id.Scope
operation_idmessage_idchannel_idthread_idAcceptance criteria
operation_id.