serenav1

package
v1.10.7 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ForwarderService_StreamMCP_FullMethodName           = "/serena.v1.ForwarderService/StreamMCP"
	ForwarderService_GetStatus_FullMethodName           = "/serena.v1.ForwarderService/GetStatus"
	ForwarderService_ActivateWorkspace_FullMethodName   = "/serena.v1.ForwarderService/ActivateWorkspace"
	ForwarderService_DeactivateWorkspace_FullMethodName = "/serena.v1.ForwarderService/DeactivateWorkspace"
)

Variables

View Source
var File_api_proto_serena_v1_ipc_proto protoreflect.FileDescriptor
View Source
var ForwarderService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "serena.v1.ForwarderService",
	HandlerType: (*ForwarderServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetStatus",
			Handler:    _ForwarderService_GetStatus_Handler,
		},
		{
			MethodName: "ActivateWorkspace",
			Handler:    _ForwarderService_ActivateWorkspace_Handler,
		},
		{
			MethodName: "DeactivateWorkspace",
			Handler:    _ForwarderService_DeactivateWorkspace_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamMCP",
			Handler:       _ForwarderService_StreamMCP_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "api/proto/serena/v1/ipc.proto",
}

ForwarderService_ServiceDesc is the grpc.ServiceDesc for ForwarderService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterForwarderServiceServer

func RegisterForwarderServiceServer(s grpc.ServiceRegistrar, srv ForwarderServiceServer)

Types

type ActivateRequest

type ActivateRequest struct {
	WorkspacePath string `protobuf:"bytes,1,opt,name=workspace_path,json=workspacePath,proto3" json:"workspace_path,omitempty"`
	// contains filtered or unexported fields
}

ActivateRequest activates a workspace by path.

func (*ActivateRequest) Descriptor deprecated

func (*ActivateRequest) Descriptor() ([]byte, []int)

Deprecated: Use ActivateRequest.ProtoReflect.Descriptor instead.

func (*ActivateRequest) GetWorkspacePath

func (x *ActivateRequest) GetWorkspacePath() string

func (*ActivateRequest) ProtoMessage

func (*ActivateRequest) ProtoMessage()

func (*ActivateRequest) ProtoReflect

func (x *ActivateRequest) ProtoReflect() protoreflect.Message

func (*ActivateRequest) Reset

func (x *ActivateRequest) Reset()

func (*ActivateRequest) String

func (x *ActivateRequest) String() string

type ActivateResponse

type ActivateResponse struct {
	AlreadyActive bool   `protobuf:"varint,1,opt,name=already_active,json=alreadyActive,proto3" json:"already_active,omitempty"`
	Status        string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // "activated" or "already_active"
	// contains filtered or unexported fields
}

ActivateResponse reports activation result.

func (*ActivateResponse) Descriptor deprecated

func (*ActivateResponse) Descriptor() ([]byte, []int)

Deprecated: Use ActivateResponse.ProtoReflect.Descriptor instead.

func (*ActivateResponse) GetAlreadyActive

func (x *ActivateResponse) GetAlreadyActive() bool

func (*ActivateResponse) GetStatus

func (x *ActivateResponse) GetStatus() string

func (*ActivateResponse) ProtoMessage

func (*ActivateResponse) ProtoMessage()

func (*ActivateResponse) ProtoReflect

func (x *ActivateResponse) ProtoReflect() protoreflect.Message

func (*ActivateResponse) Reset

func (x *ActivateResponse) Reset()

func (*ActivateResponse) String

func (x *ActivateResponse) String() string

type DeactivateRequest

type DeactivateRequest struct {
	WorkspacePath string `protobuf:"bytes,1,opt,name=workspace_path,json=workspacePath,proto3" json:"workspace_path,omitempty"`
	// contains filtered or unexported fields
}

DeactivateRequest deactivates a workspace by path.

func (*DeactivateRequest) Descriptor deprecated

func (*DeactivateRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeactivateRequest.ProtoReflect.Descriptor instead.

func (*DeactivateRequest) GetWorkspacePath

func (x *DeactivateRequest) GetWorkspacePath() string

func (*DeactivateRequest) ProtoMessage

func (*DeactivateRequest) ProtoMessage()

func (*DeactivateRequest) ProtoReflect

func (x *DeactivateRequest) ProtoReflect() protoreflect.Message

func (*DeactivateRequest) Reset

func (x *DeactivateRequest) Reset()

func (*DeactivateRequest) String

func (x *DeactivateRequest) String() string

type DeactivateResponse

type DeactivateResponse struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // "deactivated" or "not_active"
	// contains filtered or unexported fields
}

DeactivateResponse reports deactivation result.

func (*DeactivateResponse) Descriptor deprecated

func (*DeactivateResponse) Descriptor() ([]byte, []int)

Deprecated: Use DeactivateResponse.ProtoReflect.Descriptor instead.

func (*DeactivateResponse) GetStatus

func (x *DeactivateResponse) GetStatus() string

func (*DeactivateResponse) ProtoMessage

func (*DeactivateResponse) ProtoMessage()

func (*DeactivateResponse) ProtoReflect

func (x *DeactivateResponse) ProtoReflect() protoreflect.Message

func (*DeactivateResponse) Reset

func (x *DeactivateResponse) Reset()

func (*DeactivateResponse) String

func (x *DeactivateResponse) String() string

type ForwarderServiceClient

type ForwarderServiceClient interface {
	// StreamMCP carries MCP JSON-RPC messages bidirectionally.
	// Forwarder sends client messages, daemon sends responses.
	StreamMCP(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[MCPMessage, MCPMessage], error)
	// GetStatus returns workspace health for the CLI status command.
	GetStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
	// ActivateWorkspace ensures a workspace is active in the kernel.
	ActivateWorkspace(ctx context.Context, in *ActivateRequest, opts ...grpc.CallOption) (*ActivateResponse, error)
	// DeactivateWorkspace cleans up workspace session state.
	DeactivateWorkspace(ctx context.Context, in *DeactivateRequest, opts ...grpc.CallOption) (*DeactivateResponse, error)
}

ForwarderServiceClient is the client API for ForwarderService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

ForwarderService handles bidirectional MCP message streaming between the stdio forwarder and the daemon process.

type ForwarderServiceServer

type ForwarderServiceServer interface {
	// StreamMCP carries MCP JSON-RPC messages bidirectionally.
	// Forwarder sends client messages, daemon sends responses.
	StreamMCP(grpc.BidiStreamingServer[MCPMessage, MCPMessage]) error
	// GetStatus returns workspace health for the CLI status command.
	GetStatus(context.Context, *StatusRequest) (*StatusResponse, error)
	// ActivateWorkspace ensures a workspace is active in the kernel.
	ActivateWorkspace(context.Context, *ActivateRequest) (*ActivateResponse, error)
	// DeactivateWorkspace cleans up workspace session state.
	DeactivateWorkspace(context.Context, *DeactivateRequest) (*DeactivateResponse, error)
	// contains filtered or unexported methods
}

ForwarderServiceServer is the server API for ForwarderService service. All implementations must embed UnimplementedForwarderServiceServer for forward compatibility.

ForwarderService handles bidirectional MCP message streaming between the stdio forwarder and the daemon process.

type ForwarderService_StreamMCPClient

type ForwarderService_StreamMCPClient = grpc.BidiStreamingClient[MCPMessage, MCPMessage]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ForwarderService_StreamMCPServer

type ForwarderService_StreamMCPServer = grpc.BidiStreamingServer[MCPMessage, MCPMessage]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type MCPMessage

type MCPMessage struct {

	// Raw MCP JSON-RPC message bytes (not parsed by forwarder).
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// Session identifier for routing within the daemon.
	SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// contains filtered or unexported fields
}

MCPMessage wraps a raw MCP JSON-RPC message for gRPC transport.

func (*MCPMessage) Descriptor deprecated

func (*MCPMessage) Descriptor() ([]byte, []int)

Deprecated: Use MCPMessage.ProtoReflect.Descriptor instead.

func (*MCPMessage) GetPayload

func (x *MCPMessage) GetPayload() []byte

func (*MCPMessage) GetSessionId

func (x *MCPMessage) GetSessionId() string

func (*MCPMessage) ProtoMessage

func (*MCPMessage) ProtoMessage()

func (*MCPMessage) ProtoReflect

func (x *MCPMessage) ProtoReflect() protoreflect.Message

func (*MCPMessage) Reset

func (x *MCPMessage) Reset()

func (*MCPMessage) String

func (x *MCPMessage) String() string

type StatusRequest

type StatusRequest struct {
	Verbose bool `protobuf:"varint,1,opt,name=verbose,proto3" json:"verbose,omitempty"`
	// contains filtered or unexported fields
}

StatusRequest queries daemon health.

func (*StatusRequest) Descriptor deprecated

func (*StatusRequest) Descriptor() ([]byte, []int)

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) GetVerbose

func (x *StatusRequest) GetVerbose() bool

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect

func (x *StatusRequest) ProtoReflect() protoreflect.Message

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type StatusResponse

type StatusResponse struct {
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

StatusResponse carries JSON-encoded health report.

func (*StatusResponse) Descriptor deprecated

func (*StatusResponse) Descriptor() ([]byte, []int)

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) GetPayload

func (x *StatusResponse) GetPayload() []byte

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect

func (x *StatusResponse) ProtoReflect() protoreflect.Message

func (*StatusResponse) Reset

func (x *StatusResponse) Reset()

func (*StatusResponse) String

func (x *StatusResponse) String() string

type UnimplementedForwarderServiceServer

type UnimplementedForwarderServiceServer struct{}

UnimplementedForwarderServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedForwarderServiceServer) ActivateWorkspace

func (UnimplementedForwarderServiceServer) DeactivateWorkspace

func (UnimplementedForwarderServiceServer) GetStatus

func (UnimplementedForwarderServiceServer) StreamMCP

type UnsafeForwarderServiceServer

type UnsafeForwarderServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeForwarderServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ForwarderServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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