Documentation
¶
Overview ¶
Package jsonrpc implements a Unix socket JSON-RPC server for pi-go. It accepts JSON-RPC requests and streams JSONL events back to clients, enabling editor/IDE integration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Type string `json:"type"`
Agent string `json:"agent,omitempty"`
Role string `json:"role,omitempty"`
Delta string `json:"delta,omitempty"`
Content string `json:"content,omitempty"`
ToolName string `json:"tool_name,omitempty"`
ToolInput any `json:"tool_input,omitempty"`
}
Event is a JSONL streaming event (same schema as JSON mode).
type PromptParams ¶
type PromptParams struct {
Text string `json:"text"`
SessionID string `json:"session_id,omitempty"`
}
PromptParams are the parameters for the "prompt" method.
type Request ¶
type Request struct {
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
ID any `json:"id"`
}
Request is a JSON-RPC request from the client.
type Response ¶
type Response struct {
JSONRPC string `json:"jsonrpc"`
Result any `json:"result,omitempty"`
Error *Error `json:"error,omitempty"`
ID any `json:"id"`
}
Response is a JSON-RPC response to the client.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a Unix socket JSON-RPC server.
type SessionResult ¶
type SessionResult struct {
SessionID string `json:"session_id,omitempty"`
Sessions []string `json:"sessions,omitempty"`
}
SessionResult is the result of session-related methods.
Click to show internal directories.
Click to hide internal directories.