Files
coder/coderd/aibridged/client.go
T
Danny Kopping ddec110b0e refactor: move aibridged out of enterprise to AGPL (#25570)
In order to allow Coder Agents to use AI Gateway in OSS, we need to rehome the `aibridged`\-related code into the AGPL path.

The HTTP API is only registered under enterprise so will still require the AI Governance Add-on to be present in order to use it, whereas Coder Agents uses an in-memory pipe to the same handlers.
2026-05-22 09:11:37 +02:00

35 lines
631 B
Go

package aibridged
import (
"context"
"storj.io/drpc"
"github.com/coder/coder/v2/coderd/aibridged/proto"
)
type Dialer func(ctx context.Context) (DRPCClient, error)
type ClientFunc func() (DRPCClient, error)
// DRPCClient is the union of various service interfaces the client must support.
type DRPCClient interface {
proto.DRPCRecorderClient
proto.DRPCMCPConfiguratorClient
proto.DRPCAuthorizerClient
}
var _ DRPCClient = &Client{}
type Client struct {
proto.DRPCRecorderClient
proto.DRPCMCPConfiguratorClient
proto.DRPCAuthorizerClient
Conn drpc.Conn
}
func (c *Client) DRPCConn() drpc.Conn {
return c.Conn
}