Merge branch 'main' into large-chat-history

This commit is contained in:
2026-10-18 15:03:22 +01:00
27 changed files with 2371 additions and 30 deletions
+12
View File
@@ -32,9 +32,21 @@ type chatBroker interface {
// Permissions lists the session's pending OpenCode approval requests so the
// handler can push chat_permission frames.
Permissions(ctx context.Context, sessionID string) ([]protocol.ChatPermissionFrame, error)
// Shells returns only shell operations whose ownership is authoritatively
// verified for sessionID. It is the reconnect/readback source.
Shells(ctx context.Context, sessionID string) ([]protocol.ChatShell, error)
Reply(ctx context.Context, request protocol.ChatReplyRequest) 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.
// This is a bounded local-cache operation: it must not perform I/O or call the
// hub, which serializes it with room replacement under its mutex.
type chatShellReleaser interface {
ReleaseShells(sessionID string)
}
// operatorRegistry is the server-side operator-session seam. *pipeline.Store
// satisfies it. It is a table of its own, separate from the pipeline stage
// ownership (SessionOwner/run_session_owners) that settles a run: chat_sessions