Documentation
¶
Overview ¶
Package cdp discovers Antigravity 2.0 renderer targets over Chrome DevTools Protocol and injects the RTL payload into active pages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPDiscoverer ¶
type HTTPDiscoverer struct {
// contains filtered or unexported fields
}
HTTPDiscoverer queries Electron's local CDP HTTP endpoint (/json).
func NewHTTPDiscoverer ¶
func NewHTTPDiscoverer(port int) *HTTPDiscoverer
NewHTTPDiscoverer creates an HTTPDiscoverer targeting http://127.0.0.1:<port>.
func NewHTTPDiscovererWithURL ¶
func NewHTTPDiscovererWithURL(baseURL string) *HTTPDiscoverer
NewHTTPDiscovererWithURL creates an HTTPDiscoverer for a custom base URL (useful in tests).
type Sidecar ¶
type Sidecar struct {
// contains filtered or unexported fields
}
Sidecar watches CDP targets and injects the RTL payload into any new or restarted windows.
func NewSidecar ¶
func NewSidecar(discoverer TargetDiscoverer, injector Injector, payload string, pollInterval time.Duration, logger *slog.Logger) *Sidecar
NewSidecar constructs a Sidecar with the given dependencies and polling interval.
type Target ¶
type Target struct {
ID string `json:"id"`
Type string `json:"type"`
Title string `json:"title"`
URL string `json:"url"`
WebSocketDebuggerURL string `json:"webSocketDebuggerUrl"`
}
Target represents a single debuggable Chromium target returned by /json.
type TargetDiscoverer ¶
TargetDiscoverer lists active CDP targets eligible for script injection.
type WSInjector ¶
type WSInjector struct {
// contains filtered or unexported fields
}
WSInjector connects to a target's WebSocket debugger URL and evaluates the payload immediately as well as on future document loads.
func NewWSInjector ¶
func NewWSInjector() *WSInjector
NewWSInjector returns a WSInjector with a default operation timeout.