Documentation
¶
Overview ¶
Package sidecar implements the local session server. Hook handlers connect over a Unix socket. The sidecar relays events to the Kontext backend via ConnectRPC and keeps the session alive.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadMessage ¶
ReadMessage reads a length-prefixed JSON message from a connection.
Types ¶
type EvaluateRequest ¶
type EvaluateRequest struct {
Type string `json:"type"` // "evaluate"
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"`
}
EvaluateRequest is sent from kontext hook → sidecar over Unix socket.
type EvaluateResult ¶
type EvaluateResult struct {
Type string `json:"type"` // "result"
Allowed bool `json:"allowed"`
Reason string `json:"reason"`
}
EvaluateResult is sent from sidecar → kontext hook.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the local sidecar that hook handlers communicate with.
func (*Server) SocketPath ¶
SocketPath returns the Unix socket path.
Click to show internal directories.
Click to hide internal directories.