Expose session-owned chat automation metadata
This commit is contained in:
@@ -126,6 +126,10 @@ const (
|
||||
// carries ChatAttachmentImageContent. Only regular image files inside the
|
||||
// server's private chat attachment store are served.
|
||||
ChatAttachmentImage = "chat_attachment_image"
|
||||
// ChatAutomations reads provider-owned scheduled work for one operator chat.
|
||||
// It is deliberately read-only; providers that cannot authoritatively expose
|
||||
// this information return an unavailable status instead of an empty count.
|
||||
ChatAutomations = "chat_automations"
|
||||
// ChatEvent and ChatPermission are the server-pushed frames; they are the
|
||||
// only types the server sends without a matching request.
|
||||
ChatEvent = "chat_event"
|
||||
@@ -141,6 +145,22 @@ const (
|
||||
ChatPermission = "chat_permission"
|
||||
)
|
||||
|
||||
const (
|
||||
ChatAutomationSupported = "supported"
|
||||
ChatAutomationUnavailable = "unavailable"
|
||||
)
|
||||
|
||||
// ChatAutomationInfo is the bounded, per-session scheduled-work snapshot. A
|
||||
// nil ActiveCount means the provider could not authoritatively report a count;
|
||||
// zero is reserved for a supported provider with no active schedules.
|
||||
type ChatAutomationInfo struct {
|
||||
SessionID string `json:"session_id"`
|
||||
Provider string `json:"provider"`
|
||||
Status string `json:"status"`
|
||||
ActiveCount *int `json:"active_count,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
// Content part types carried by ChatPart.Type and ChatEvent.Kind.
|
||||
const (
|
||||
ChatPartText = "text"
|
||||
|
||||
@@ -270,6 +270,9 @@ type Message struct {
|
||||
// ChatAttachmentImage its reply.
|
||||
ChatAttachmentImageRequest *ChatAttachmentImageRequest `json:"chat_attachment_image_request,omitempty"`
|
||||
ChatAttachmentImage *ChatAttachmentImageContent `json:"chat_attachment_image,omitempty"`
|
||||
// ChatAutomations is the provider-owned scheduled-work readback for one
|
||||
// operator session. ActiveCount is omitted when the count is unknown.
|
||||
ChatAutomations *ChatAutomationInfo `json:"chat_automations,omitempty"`
|
||||
// RunEvent is the server-pushed run state delta (see runevents.go) and
|
||||
// RunIDs the optional subscribe scope, so a client asks for the runs it
|
||||
// displays. Both are optional so older peers ignore them.
|
||||
|
||||
Reference in New Issue
Block a user