Expose session-owned chat automation metadata
This commit is contained in:
@@ -85,6 +85,13 @@ type chatShellOutputReader interface {
|
||||
ShellOutput(ctx context.Context, query protocol.ChatShellOutputQuery) (protocol.ChatShellOutputPage, error)
|
||||
}
|
||||
|
||||
// chatAutomationReader is optional so every broker and test fake does not need
|
||||
// to grow a scheduler-shaped interface. Implementations must read only
|
||||
// provider-owned, session-scoped metadata and return unavailable explicitly.
|
||||
type chatAutomationReader interface {
|
||||
Automations(ctx context.Context, sessionID string) (protocol.ChatAutomationInfo, error)
|
||||
}
|
||||
|
||||
// chatShellReleaser is implemented by brokers that retain verified shell ids for
|
||||
// attributing exit events. The hub calls it only after the last observer leaves
|
||||
// a room; a later attach obtains a fresh authoritative snapshot.
|
||||
@@ -251,6 +258,9 @@ func handleChat(ctx context.Context, request protocol.Message, broker chatBroker
|
||||
case protocol.ChatAttachmentImage:
|
||||
handleChatAttachmentImage(request, broker, write)
|
||||
return true
|
||||
case protocol.ChatAutomations:
|
||||
handleChatAutomations(ctx, request, broker, registry, write)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user