sidecar

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadMessage

func ReadMessage(conn net.Conn, v any) error

func WriteMessage

func WriteMessage(conn net.Conn, v any) error

Types

type EvaluateRequest

type EvaluateRequest struct {
	Type         string          `json:"type"`
	Agent        string          `json:"agent"`
	HookEvent    string          `json:"hook_event"`
	ToolName     string          `json:"tool_name"`
	ToolInput    json.RawMessage `json:"tool_input,omitempty"`
	ToolResponse json.RawMessage `json:"tool_response,omitempty"`
	ToolUseID    string          `json:"tool_use_id"`
	CWD          string          `json:"cwd"`
}

type EvaluateResult

type EvaluateResult struct {
	Type    string `json:"type"`
	Allowed bool   `json:"allowed"`
	Reason  string `json:"reason"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(sessionDir string, client *backend.Client, sessionID, agentName string, diagnostics diagnostic.Logger) (*Server, error)

New creates a new sidecar server.

func (*Server) SocketPath

func (s *Server) SocketPath() string

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

func (*Server) Stop

func (s *Server) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL