Documentation
¶
Overview ¶
Package agyproxy contains the temporary request-filter compatibility layer needed while agy cannot combine MCP with an empty native-tool set.
Keep this package independent of internal/llm. Once agy supports that combination directly, the provider can replace its agyToolIsolation implementation and this package can be deleted.
Index ¶
- Constants
- func ExpandGenerationArtifacts(body []byte, artifactRoot string) ([]byte, error)
- func FilterGenerationRequest(body []byte, requireMCP bool) ([]byte, error)
- type Server
- func (s *Server) BeginTurn(requireMCP bool)
- func (s *Server) FilteredGenerations() int64
- func (s *Server) SetArtifactRoot(root string)
- func (s *Server) SetRequireMCP(required bool)
- func (s *Server) SetUpstream(proxyURL, caPath string)
- func (s *Server) Start() (proxyURL, caPath string, err error)
- func (s *Server) Stop(ctx context.Context) error
Constants ¶
const ( CloudCodeHost = "daily-cloudcode-pa.googleapis.com" // GenerationTraceFileEnv enables an opt-in JSONL trace containing the exact // generation request received from agy and the artifact-rehydrated, tool- // filtered request sent upstream. These requests contain full conversation // content and must be treated as sensitive. GenerationTraceFileEnv = "TERM_LLM_AGY_PROXY_TRACE_FILE" )
Variables ¶
This section is empty.
Functions ¶
func ExpandGenerationArtifacts ¶ added in v0.0.373
ExpandGenerationArtifacts replaces agy's private spill-file notices in the model request with their original contents. Only regular output.txt files in <artifactRoot>/<conversation>/.system_generated/steps/<number>/ are eligible; missing, malformed, oversized, symlinked, or external paths are left intact.
func FilterGenerationRequest ¶
FilterGenerationRequest removes every function declaration except the real agy MCP dispatcher. Unknown fields are preserved. Requests without a tools field are auxiliary generations and are forwarded with an empty tool list.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a loopback-only HTTPS forward proxy. It intercepts only the Cloud Code host; CONNECT requests for every other host are tunneled without TLS termination.
func (*Server) BeginTurn ¶
BeginTurn resets interception evidence and configures dispatcher enforcement.
func (*Server) FilteredGenerations ¶
FilteredGenerations reports successfully rewritten generation requests in the current turn.
func (*Server) SetArtifactRoot ¶ added in v0.0.373
SetArtifactRoot restricts agy spill-file rehydration to the provider's private antigravity-cli/brain directory. The directory may not exist yet when configured; every candidate is resolved and containment-checked at read time.
func (*Server) SetRequireMCP ¶
SetRequireMCP controls whether generation requests lacking call_mcp_tool are rejected. Providers should enable this for turns exposing term-llm tools.
func (*Server) SetUpstream ¶ added in v0.0.392
SetUpstream configures an optional authenticated HTTP proxy used for all outbound traffic. It must be called before Start.