WIP: Save agent roles integration work before CHORUS rebrand

- Agent roles and coordination features
- Chat API integration testing
- New configuration and workspace management

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
anthonyrawlins
2025-08-01 02:21:11 +10:00
parent 81b473d48f
commit 5978a0b8f5
3713 changed files with 1103925 additions and 59 deletions

View File

@@ -0,0 +1,42 @@
package webtransport
import (
"sync"
"github.com/quic-go/quic-go"
)
type closeFunc func()
// The streamsMap manages the streams of a single QUIC connection.
// Note that several WebTransport sessions can share one QUIC connection.
type streamsMap struct {
mx sync.Mutex
m map[quic.StreamID]closeFunc
}
func newStreamsMap() *streamsMap {
return &streamsMap{m: make(map[quic.StreamID]closeFunc)}
}
func (s *streamsMap) AddStream(id quic.StreamID, close closeFunc) {
s.mx.Lock()
s.m[id] = close
s.mx.Unlock()
}
func (s *streamsMap) RemoveStream(id quic.StreamID) {
s.mx.Lock()
delete(s.m, id)
s.mx.Unlock()
}
func (s *streamsMap) CloseSession() {
s.mx.Lock()
defer s.mx.Unlock()
for _, cl := range s.m {
cl()
}
s.m = nil
}