Versions in this module Expand all Collapse all v0 v0.43.0 Oct 24, 2026 v0.42.0 Oct 23, 2026 Changes in this version + const MaxFrameBytes + const MaxPendingRPCs + const MaxRPCFrames + const SocketEnv + const TokenEnv + func BindJSONString(raw []byte, path []string, want, replacement string) ([]byte, error) + func ProxyCommand(socket, token string, args, env []string, stdio [3]*os.File) error + func WriteCapability(w io.Writer, c Capability) error + func WriteLine(w io.Writer, raw []byte) error + type Capability struct + Mode string + Socket string + Token string + Version int + func ReadCapability(r io.Reader) (Capability, error) + type Coordinator struct + func NewCoordinator(validate func(Direction, []byte) error) (*Coordinator, error) + func NewReplayCoordinator(ctx context.Context, events []RPCEvent, validate func(Direction, []byte) error, ...) (*Coordinator, error) + func (c *Coordinator) Abort() + func (c *Coordinator) Checkpoint() ([]RPCEvent, error) + func (c *Coordinator) CloseRPC(connection string, inputEOF, outputEOF bool, waitErr error) error + func (c *Coordinator) DiagnosticSnapshot() []RPCEvent + func (c *Coordinator) Finish() ([]RPCEvent, error) + func (c *Coordinator) ForwardRPC(connection string, direction Direction, wire []byte, ...) error + func (c *Coordinator) NativeInput(user bool, forward func() error) error + func (c *Coordinator) NativeOutput(forward func() error) error + func (c *Coordinator) Register(connection string) error + type Direction string + const ClientToServer + const ServerToClient + type Exchange struct + Ordinal int + Request RPCFrame + Response RPCFrame + type FrameKind string + const Notification + const Request + const Response + type LaunchBinding struct + Binary string + BinarySHA256 string + Home string + NativeOwnerPID int + SessionID string + Socket string + WorkDir string + type ProxyServer struct + func NewProxyServer(ctx context.Context, b LaunchBinding, c *Coordinator, ...) (*ProxyServer, error) + func (s *ProxyServer) Capability() (socket, token string) + func (s *ProxyServer) FailureStage() string + func (s *ProxyServer) Join(budget time.Duration) ([]ServerProof, error) + func (s *ProxyServer) StderrSnapshot() (map[string]string, error) + type RPCEvent struct + Connection string + Direction Direction + NativeInputCount int + NativeStdoutCount int + Raw string + Sequence int + UserOrdinal int + type RPCFrame struct + Error json.RawMessage + ID json.RawMessage + IDKey string + Kind FrameKind + Method string + Params json.RawMessage + Raw json.RawMessage + Result json.RawMessage + func ParseRPC(raw []byte) (RPCFrame, error) + type RPCSession struct + func NewRPCSession() *RPCSession + func (s *RPCSession) Finish() ([]Exchange, error) + func (s *RPCSession) Observe(direction Direction, raw []byte) (RPCFrame, error) + type ReplayServers struct + func StartReplayServers(ctx context.Context, b LaunchBinding, c *Coordinator, declaredKinds []string, ...) (*ReplayServers, error) + func (s *ReplayServers) Abort() + func (s *ReplayServers) CompleteAndJoin(budget time.Duration) ([]ServerProof, error) + func (s *ReplayServers) StderrSnapshot() (map[string]string, error) + type ServerLogs struct + func (s *ServerLogs) Snapshot() (map[string]string, error) + type ServerProof struct + ExitCode int + InputEOF bool + InputFrames int + Kind string + NativeOwnerPID int + NativeProxyPID int + OutputEOF bool + OutputFrames int + ServerPID int + Stderr string + StderrEOF bool