Documentation
¶
Overview ¶
Package bridge exposes local bridge endpoints for editor and remote clients.
Index ¶
- func Capabilities() []string
- type EditorIdentity
- type EditorOpenFile
- type EditorSelection
- type EditorState
- type Error
- type FaultEvent
- type Notification
- type Request
- type Response
- type Server
- func (s Server) BridgeFaults() ([]FaultEvent, error)
- func (s Server) ClearBridgeFaults() error
- func (s Server) ClearEditorState() error
- func (s Server) EditorState() (EditorState, error)
- func (s Server) EditorStatePath() (string, error)
- func (s Server) IdentifyEditor(params json.RawMessage) (*EditorIdentity, error)
- func (s Server) InitializeResult() map[string]any
- func (s Server) OpenEditorFile(params json.RawMessage) (*EditorOpenFile, error)
- func (s Server) RecordBridgeFault(action string, args []string) (FaultEvent, error)
- func (s Server) Serve(in io.Reader, out io.Writer) error
- func (s Server) SetEditorSelection(params json.RawMessage) (*EditorSelection, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capabilities ¶
func Capabilities() []string
Capabilities returns the JSON-RPC bridge methods advertised during initialization.
Types ¶
type EditorIdentity ¶
type EditorOpenFile ¶
type EditorSelection ¶
type EditorState ¶
type EditorState struct {
Identity *EditorIdentity `json:"identity,omitempty"`
OpenFile *EditorOpenFile `json:"open_file,omitempty"`
Selection *EditorSelection `json:"selection,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
type FaultEvent ¶
type FaultEvent struct {
ID string `json:"id"`
Action string `json:"action"`
Args []string `json:"args,omitempty"`
Category string `json:"category"`
Severity string `json:"severity"`
Recoverable bool `json:"recoverable"`
Message string `json:"message"`
Remediation string `json:"remediation"`
CreatedAt time.Time `json:"created_at"`
}
type Notification ¶
type Request ¶
type Request struct {
JSONRPC string `json:"jsonrpc"`
ID json.RawMessage `json:"id,omitempty"`
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
}
type Server ¶
type Server struct {
Sessions *session.Store
Version string
Workspace string
ConfigHome string
TrustToken string
Executable string
MCPServers map[string]config.MCPServerConfig
}
func (Server) BridgeFaults ¶
func (s Server) BridgeFaults() ([]FaultEvent, error)
func (Server) ClearBridgeFaults ¶
func (Server) ClearEditorState ¶
func (Server) EditorState ¶
func (s Server) EditorState() (EditorState, error)
func (Server) EditorStatePath ¶
func (Server) IdentifyEditor ¶
func (s Server) IdentifyEditor(params json.RawMessage) (*EditorIdentity, error)
func (Server) InitializeResult ¶
InitializeResult returns the stdio bridge initialization payload.
func (Server) OpenEditorFile ¶
func (s Server) OpenEditorFile(params json.RawMessage) (*EditorOpenFile, error)
func (Server) RecordBridgeFault ¶
func (s Server) RecordBridgeFault(action string, args []string) (FaultEvent, error)
func (Server) SetEditorSelection ¶
func (s Server) SetEditorSelection(params json.RawMessage) (*EditorSelection, error)
Click to show internal directories.
Click to hide internal directories.