chore: strip pre-fork version comments across 72 files
Removes standalone "// v0.X.X:" comment lines and inline trailing version annotations. Keeps version references in config field docs and compatibility notes where they describe requirements. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -113,7 +113,7 @@ func TestRouteFor(t *testing.T) {
|
||||
{"pong", DirToClient},
|
||||
// Tool bridge routes
|
||||
{"tool.call.abc123", DirToClient},
|
||||
{"tool.result.abc123", DirBoth}, // v0.32.0: DirBoth for cross-pod WaitFor
|
||||
{"tool.result.abc123", DirBoth},
|
||||
// Extension lifecycle
|
||||
{"extension.loaded", DirLocal},
|
||||
{"extension.error", DirLocal},
|
||||
@@ -227,7 +227,6 @@ func TestToolCallRouteToClient(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestToolResultRouteBoth(t *testing.T) {
|
||||
// v0.32.0: tool.result is DirBoth so results cross pods for WaitFor.
|
||||
// The WS subscriber explicitly filters out tool.result events to
|
||||
// prevent re-sending to clients (see subscribeToBus in ws.go).
|
||||
if !ShouldAcceptFromClient("tool.result.abc123") {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package events
|
||||
|
||||
// v0.32.0: TicketValidatorAdapter bridges the context-aware store.TicketStore
|
||||
// to the middleware.TicketValidator interface (which has no context parameter).
|
||||
// Replaces the in-memory TicketStore that lived in this file previously.
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ type Event struct {
|
||||
Payload json.RawMessage `json:"payload"`
|
||||
Ts int64 `json:"ts"`
|
||||
|
||||
// v0.32.0: Cross-pod targeted delivery. When set, only connections
|
||||
// belonging to this user receive the event. Serialized for pg_broadcast
|
||||
// (harmless if clients see it — they ignore unknown fields).
|
||||
TargetUserID string `json:"target_user_id,omitempty"`
|
||||
@@ -38,8 +37,8 @@ var routeTable = map[string]Direction{
|
||||
// User/presence
|
||||
"user.presence": DirToClient,
|
||||
"user.status": DirToClient,
|
||||
"user.mentioned": DirToClient, // v0.23.2: targeted @mention notification
|
||||
"typing.user": DirToClient, // v0.23.2: human typing in DM/channel
|
||||
"user.mentioned": DirToClient,
|
||||
"typing.user": DirToClient,
|
||||
|
||||
// System
|
||||
"system.notify": DirToClient,
|
||||
@@ -77,7 +76,7 @@ var routeTable = map[string]Direction{
|
||||
|
||||
// Tool execution (browser tools bridge)
|
||||
"tool.call.": DirToClient, // Server → specific client (browser tool invocation)
|
||||
"tool.result.": DirBoth, // v0.32.0: DirBoth — result must cross pods for WaitFor
|
||||
"tool.result.": DirBoth,
|
||||
|
||||
// Extension lifecycle
|
||||
"extension.loaded": DirLocal, // Client-only
|
||||
|
||||
@@ -174,7 +174,6 @@ func (h *Hub) IsConnected(userID string) bool {
|
||||
}
|
||||
|
||||
// PublishToUser sends an event to a specific user via the bus.
|
||||
// v0.32.0: Cross-pod safe — the bus broadcast hook fans out via pg_notify.
|
||||
// All replicas receive the event; only the one with the user's connection delivers it.
|
||||
func (h *Hub) PublishToUser(userID string, event Event) {
|
||||
event.TargetUserID = userID
|
||||
@@ -238,13 +237,11 @@ func (c *Conn) subscribeToBus() {
|
||||
return
|
||||
}
|
||||
|
||||
// v0.32.0: Targeted delivery — only deliver to the intended user.
|
||||
// Targeted events skip room filtering (user-scoped, not room-scoped).
|
||||
if e.TargetUserID != "" && e.TargetUserID != c.userID {
|
||||
return
|
||||
}
|
||||
|
||||
// v0.32.0: tool.result travels cross-pod for WaitFor (DirBoth) but
|
||||
// must not be forwarded to WebSocket clients — they sent it.
|
||||
if strings.HasPrefix(e.Label, "tool.result.") {
|
||||
return
|
||||
@@ -316,7 +313,6 @@ func (c *Conn) readPump() {
|
||||
continue
|
||||
}
|
||||
|
||||
// v0.5.0: Room management — intercept before bus publish (like ping)
|
||||
if event.Label == "room.subscribe" {
|
||||
var req struct {
|
||||
Room string `json:"room"`
|
||||
|
||||
Reference in New Issue
Block a user