Changeset 0.28.0.2 (#174)

This commit is contained in:
2026-03-11 19:41:04 +00:00
parent 58313f7e31
commit 8e08f3e4b0
19 changed files with 1734 additions and 384 deletions

View File

@@ -2,6 +2,7 @@
//
// v0.27.3: Retry (3 attempts, exponential backoff), HMAC-SHA256 signature,
// 10s timeout per attempt.
// v0.28.0: Added RunID, TokensUsed fields (D1 audit fix).
package webhook
import (
@@ -27,12 +28,14 @@ const (
// Payload is the JSON body sent to webhook endpoints.
type Payload struct {
TaskID string `json:"task_id,omitempty"`
RunID string `json:"run_id,omitempty"`
TaskName string `json:"task_name,omitempty"`
WorkflowID string `json:"workflow_id,omitempty"`
ChannelID string `json:"channel_id,omitempty"`
Status string `json:"status"`
CompletedAt time.Time `json:"completed_at"`
Output string `json:"output,omitempty"` // last assistant message or summary
Output string `json:"output,omitempty"` // last assistant message or relay payload
TokensUsed int `json:"tokens_used,omitempty"` // total tokens consumed
StageData any `json:"stage_data,omitempty"` // workflow stage data (if applicable)
Error string `json:"error,omitempty"`
}