Expose session-owned chat automation metadata

This commit is contained in:
2026-11-08 15:24:23 +00:00
parent cecfa39aac
commit 9d3358be47
12 changed files with 413 additions and 0 deletions
+10
View File
@@ -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
}