MCPcopy Create free account
hub / github.com/compozy/agh / nativeFilterNetworkEnvelopes

Function nativeFilterNetworkEnvelopes

internal/daemon/native_tools.go:4853–4867  ·  view source on GitHub ↗
(
	bound *nativeBoundSessionScope,
	messages []network.Envelope,
)

Source from the content-addressed store, hash-verified

4851}
4852
4853func nativeFilterNetworkEnvelopes(
4854 bound *nativeBoundSessionScope,
4855 messages []network.Envelope,
4856) []network.Envelope {
4857 if bound == nil || len(bound.networkChannels) == 0 {
4858 return messages
4859 }
4860 filtered := make([]network.Envelope, 0, len(messages))
4861 for _, message := range messages {
4862 if nativeBoundSessionAllowsChannel(bound, message.Channel) {
4863 filtered = append(filtered, message)
4864 }
4865 }
4866 return filtered
4867}
4868
4869func nativeBoundChannelDenied(id toolspkg.ToolID, channel string) error {
4870 return toolspkg.NewToolError(

Callers 1

networkInboxMethod · 0.85

Calls 2

appendFunction · 0.85

Tested by

no test coverage detected