Documentation
¶
Overview ¶
Package rpc exposes the engine over JSON-RPC. It powers:
- `sweef serve` — TCP/Unix socket server for SDKs (Node & Python)
- stdio loop — used by the MCP bridge and `sweef call <method>`
Method names mirror CDP namespaces (Page.*, DOM.*, Network.*, Runtime.*) so the shim in internal/cdp can translate real DevTools traffic onto these, and so Playwright-style SDKs map 1:1 onto our verbs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct {
// IdleTimeout, when > 0, makes ServeTCP return after that long without a
// request (session daemons started by the CLI use it).
IdleTimeout time.Duration
// OnShutdown is invoked by the Browser.shutdown method (CLI `close`).
OnShutdown func()
// contains filtered or unexported fields
}
func (*Server) Call ¶
func (s *Server) Call(method string, raw json.RawMessage) (json.RawMessage, *protocol.RpcError)
Call executes one method and returns a JSON result or an RpcError.