Changeset 0.32.0 (#206)
This commit is contained in:
@@ -115,7 +115,7 @@ func TestRouteFor(t *testing.T) {
|
||||
{"pong", DirToClient},
|
||||
// Tool bridge routes
|
||||
{"tool.call.abc123", DirToClient},
|
||||
{"tool.result.abc123", DirFromClient},
|
||||
{"tool.result.abc123", DirBoth}, // v0.32.0: DirBoth for cross-pod WaitFor
|
||||
// Extension lifecycle
|
||||
{"extension.loaded", DirLocal},
|
||||
{"extension.error", DirLocal},
|
||||
@@ -201,11 +201,14 @@ func TestToolCallRouteToClient(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestToolResultRouteFromClient(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") {
|
||||
t.Error("tool.result.* should be accepted from client")
|
||||
}
|
||||
if ShouldSendToClient("tool.result.abc123") {
|
||||
t.Error("tool.result.* should NOT be sent to client")
|
||||
if !ShouldSendToClient("tool.result.abc123") {
|
||||
t.Error("tool.result.* should route DirBoth (filtered by WS subscriber, not routing table)")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user