abyss

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package abyss defines the core domain types used across the Abyss project.

Index

Constants

This section is empty.

Variables

View Source
var (
	// RequestPermissionRequestMsg is the message type for requesting permission
	// to perform an action.
	RequestPermissionRequestMsg = newMessageTypeT[acp.RequestPermissionRequest](
		"RequestPermissionRequest",
		RequestPermissionRequestType,
		ToACPClient,
		false,
	)

	// RequestPermissionResponseMsg is the message type for the response to a
	// request permission request.
	RequestPermissionResponseMsg = newMessageTypeT[acp.RequestPermissionResponse](
		"RequestPermissionResponse",
		RequestPermissionResponseType, ToAgent, true,
	)

	// WriteTextFileRequestMsg is the message type for requesting to write a text
	// file.
	WriteTextFileRequestMsg = newMessageTypeT[acp.WriteTextFileRequest](
		"WriteTextFileRequest",
		WriteTextFileRequestType, ToACPClient, false,
	)

	// WriteTextFileResponseMsg is the message type for the response to a write
	// text file request.
	WriteTextFileResponseMsg = newMessageTypeT[acp.WriteTextFileResponse](
		"WriteTextFileResponse",
		WriteTextFileResponseType, ToAgent, true,
	)

	// ReadTextFileRequestMsg is the message type for requesting to read a text
	// file.
	ReadTextFileRequestMsg = newMessageTypeT[acp.ReadTextFileRequest](
		"ReadTextFileRequest",
		ReadTextFileRequestType, ToACPClient, false,
	)

	// ReadTextFileResponseMsg is the message type for the response to a read
	// text file request.
	ReadTextFileResponseMsg = newMessageTypeT[acp.ReadTextFileResponse](
		"ReadTextFileResponse",
		ReadTextFileResponseType, ToAgent, true,
	)

	// CreateTerminalRequestMsg is the message type for requesting to create a
	// terminal.
	CreateTerminalRequestMsg = newMessageTypeT[acp.CreateTerminalRequest](
		"CreateTerminalRequest",
		CreateTerminalRequestType, ToACPClient, false,
	)

	// CreateTerminalResponseMsg is the message type for the response to a
	// create-terminal request.
	CreateTerminalResponseMsg = newMessageTypeT[acp.CreateTerminalResponse](
		"CreateTerminalResponse",
		CreateTerminalResponseType, ToAgent, true,
	)

	// TerminalOutputRequestMsg is the message type for requesting terminal
	// output.
	TerminalOutputRequestMsg = newMessageTypeT[acp.TerminalOutputRequest](
		"TerminalOutputRequest",
		TerminalOutputRequestType, ToACPClient, false,
	)

	// TerminalOutputResponseMsg is the message type for the response to a
	// terminal-output request.
	TerminalOutputResponseMsg = newMessageTypeT[acp.TerminalOutputResponse](
		"TerminalOutputResponse",
		TerminalOutputResponseType, ToAgent, true,
	)

	// ReleaseTerminalRequestMsg is the message type for requesting to release a
	// terminal.
	ReleaseTerminalRequestMsg = newMessageTypeT[acp.ReleaseTerminalRequest](
		"ReleaseTerminalRequest",
		ReleaseTerminalRequestType, ToACPClient, false,
	)

	// ReleaseTerminalResponseMsg is the message type for the response to a
	// release-terminal request.
	ReleaseTerminalResponseMsg = newMessageTypeT[acp.ReleaseTerminalResponse](
		"ReleaseTerminalResponse",
		ReleaseTerminalResponseType, ToAgent, true,
	)

	// WaitForTerminalExitRequestMsg is the message type for requesting to wait
	// for a terminal to exit.
	WaitForTerminalExitRequestMsg = newMessageTypeT[acp.WaitForTerminalExitRequest](
		"WaitForTerminalExitRequest",
		WaitForTerminalExitRequestType, ToACPClient, false,
	)

	// WaitForTerminalExitResponseMsg is the message type for the response to a
	// wait-for-terminal-exit request.
	WaitForTerminalExitResponseMsg = newMessageTypeT[acp.WaitForTerminalExitResponse](
		"WaitForTerminalExitResponse",
		WaitForTerminalExitResponseType, ToAgent, true,
	)

	// KillTerminalRequestMsg is the message type for requesting to kill a
	// terminal.
	KillTerminalRequestMsg = newMessageTypeT[acp.KillTerminalRequest](
		"KillTerminalRequest",
		KillTerminalRequestType, ToACPClient, false,
	)

	// KillTerminalResponseMsg is the message type for the response to a
	// kill-terminal request.
	KillTerminalResponseMsg = newMessageTypeT[acp.KillTerminalResponse](
		"KillTerminalResponse",
		KillTerminalResponseType, ToAgent, true,
	)

	// SessionNotificationMsg is the message type for a session notification.
	SessionNotificationMsg = newMessageTypeT[acp.SessionNotification](
		"SessionNotification",
		SessionNotificationType, ToACPClient, false,
	)

	// SetSessionModeRequestMsg is the message type for requesting to set the
	// session mode.
	SetSessionModeRequestMsg = newMessageTypeT[acp.SetSessionModeRequest](
		"SetSessionModeRequest",
		SetSessionModeRequestType, ToAgent, false,
	)

	// SetSessionModeResponseMsg is the message type for the response to a
	// set-session-mode request.
	SetSessionModeResponseMsg = newMessageTypeT[acp.SetSessionModeResponse](
		"SetSessionModeResponse",
		SetSessionModeResponseType, ToACPClient, true,
	)

	// UnstableForkSessionRequestMsg is the message type for requesting to fork
	// a session.
	UnstableForkSessionRequestMsg = newMessageTypeT[acp.UnstableForkSessionRequest](
		"UnstableForkSessionRequest",
		UnstableForkSessionRequestType, ToAgent, false,
	)

	// UnstableForkSessionResponseMsg is the message type for the response to a
	// fork-session request.
	UnstableForkSessionResponseMsg = newMessageTypeT[acp.UnstableForkSessionResponse](
		"UnstableForkSessionResponse",
		UnstableForkSessionResponseType, ToACPClient, true,
	)

	// ListSessionsRequestMsg is the message type for requesting to list
	// sessions.
	ListSessionsRequestMsg = newMessageTypeT[acp.ListSessionsRequest](
		"ListSessionsRequest",
		ListSessionsRequestType,
		ToAgent,
		false,
	)

	// ListSessionsResponseMsg is the message type for the response to a
	// list-sessions request.
	ListSessionsResponseMsg = newMessageTypeT[acp.ListSessionsResponse](
		"ListSessionsResponse",
		ListSessionsResponseType, ToACPClient, true,
	)

	// ResumeSessionRequestMsg is the message type for requesting to resume a
	// session.
	ResumeSessionRequestMsg = newMessageTypeT[acp.ResumeSessionRequest](
		"ResumeSessionRequest",
		ResumeSessionRequestType, ToAgent, false,
	)

	// ResumeSessionResponseMsg is the message type for the response to a
	// resume-session request.
	ResumeSessionResponseMsg = newMessageTypeT[acp.ResumeSessionResponse](
		"ResumeSessionResponse",
		ResumeSessionResponseType, ToACPClient, true,
	)

	// SetSessionConfigOptionRequestMsg is the message type for requesting to
	// set a session config option.
	SetSessionConfigOptionRequestMsg = newMessageTypeT[acp.SetSessionConfigOptionRequest](
		"SetSessionConfigOptionRequest",
		SetSessionConfigOptionRequestType, ToAgent, false,
	)

	// SetSessionConfigOptionResponseMsg is the message type for the response
	// to a set-session-config-option request.
	SetSessionConfigOptionResponseMsg = newMessageTypeT[acp.SetSessionConfigOptionResponse](
		"SetSessionConfigOptionResponse",
		SetSessionConfigOptionResponseType, ToACPClient, true,
	)

	// LogoutRequestMsg is the message type for requesting to log out.
	LogoutRequestMsg = newMessageTypeT[acp.LogoutRequest](
		"LogoutRequest",
		LogoutRequestType, ToAgent, false,
	)

	// LogoutResponseMsg is the message type for the response to a logout
	// request.
	LogoutResponseMsg = newMessageTypeT[acp.LogoutResponse]("LogoutResponse", LogoutResponseType, ToACPClient, true)

	// UnstableCloseNesRequestMsg is the message type for requesting to close
	// an NES.
	UnstableCloseNesRequestMsg = newMessageTypeT[acp.UnstableCloseNesRequest](
		"UnstableCloseNesRequest",
		UnstableCloseNesRequestType, ToAgent, false,
	)

	// UnstableCloseNesResponseMsg is the message type for the response to a
	// close-NES request.
	UnstableCloseNesResponseMsg = newMessageTypeT[acp.UnstableCloseNesResponse](
		"UnstableCloseNesResponse",
		UnstableCloseNesResponseType, ToACPClient, true,
	)

	// UnstableStartNesRequestMsg is the message type for requesting to start
	// an NES.
	UnstableStartNesRequestMsg = newMessageTypeT[acp.UnstableStartNesRequest](
		"UnstableStartNesRequest",
		UnstableStartNesRequestType, ToAgent, false,
	)

	// UnstableStartNesResponseMsg is the message type for the response to a
	// start-NES request.
	UnstableStartNesResponseMsg = newMessageTypeT[acp.UnstableStartNesResponse](
		"UnstableStartNesResponse",
		UnstableStartNesResponseType, ToACPClient, true,
	)

	// UnstableSuggestNesRequestMsg is the message type for requesting NES
	// suggestions.
	UnstableSuggestNesRequestMsg = newMessageTypeT[acp.UnstableSuggestNesRequest](
		"UnstableSuggestNesRequest",
		UnstableSuggestNesRequestType, ToAgent, false,
	)

	// UnstableSuggestNesResponseMsg is the message type for the response to an
	// NES-suggest request.
	UnstableSuggestNesResponseMsg = newMessageTypeT[acp.UnstableSuggestNesResponse](
		"UnstableSuggestNesResponse",
		UnstableSuggestNesResponseType, ToACPClient, true,
	)

	// UnstableAcceptNesNotificationMsg is the message type for an accept-NES
	// notification.
	UnstableAcceptNesNotificationMsg = newMessageTypeT[acp.UnstableAcceptNesNotification](
		"UnstableAcceptNesNotification",
		UnstableAcceptNesNotificationType, ToAgent, false,
	)

	// UnstableRejectNesNotificationMsg is the message type for a reject-NES
	// notification.
	UnstableRejectNesNotificationMsg = newMessageTypeT[acp.UnstableRejectNesNotification](
		"UnstableRejectNesNotification",
		UnstableRejectNesNotificationType, ToAgent, false,
	)

	// UnstableDidChangeDocumentNotifMsg is the message type for a
	// did-change-document notification.
	UnstableDidChangeDocumentNotifMsg = newMessageTypeT[acp.UnstableDidChangeDocumentNotification](
		"UnstableDidChangeDocumentNotif",
		UnstableDidChangeDocumentNotificationType, ToAgent, false,
	)

	// UnstableDidCloseDocumentNotifMsg is the message type for a
	// did-close-document notification.
	UnstableDidCloseDocumentNotifMsg = newMessageTypeT[acp.UnstableDidCloseDocumentNotification](
		"UnstableDidCloseDocumentNotif",
		UnstableDidCloseDocumentNotificationType, ToAgent, false,
	)

	// UnstableDidFocusDocumentNotifMsg is the message type for a
	// did-focus-document notification.
	UnstableDidFocusDocumentNotifMsg = newMessageTypeT[acp.UnstableDidFocusDocumentNotification](
		"UnstableDidFocusDocumentNotif",
		UnstableDidFocusDocumentNotificationType, ToAgent, false,
	)

	// UnstableDidOpenDocumentNotifMsg is the message type for a
	// did-open-document notification.
	UnstableDidOpenDocumentNotifMsg = newMessageTypeT[acp.UnstableDidOpenDocumentNotification](
		"UnstableDidOpenDocumentNotif",
		UnstableDidOpenDocumentNotificationType, ToAgent, false,
	)

	// UnstableDidSaveDocumentNotifMsg is the message type for a
	// did-save-document notification.
	UnstableDidSaveDocumentNotifMsg = newMessageTypeT[acp.UnstableDidSaveDocumentNotification](
		"UnstableDidSaveDocumentNotif",
		UnstableDidSaveDocumentNotificationType, ToAgent, false,
	)

	// UnstableDisableProviderRequestMsg is the message type for requesting to
	// disable a provider.
	UnstableDisableProviderRequestMsg = newMessageTypeT[acp.UnstableDisableProviderRequest](
		"UnstableDisableProviderRequest",
		UnstableDisableProviderRequestType, ToAgent, false,
	)

	// UnstableDisableProviderResponseMsg is the message type for the response
	// to a disable-provider request.
	UnstableDisableProviderResponseMsg = newMessageTypeT[acp.UnstableDisableProviderResponse](
		"UnstableDisableProviderResponse",
		UnstableDisableProviderResponseType, ToACPClient, true,
	)

	// UnstableListProvidersRequestMsg is the message type for requesting to
	// list providers.
	UnstableListProvidersRequestMsg = newMessageTypeT[acp.UnstableListProvidersRequest](
		"UnstableListProvidersRequest",
		UnstableListProvidersRequestType, ToAgent, false,
	)

	// UnstableListProvidersResponseMsg is the message type for the response to
	// a list-providers request.
	UnstableListProvidersResponseMsg = newMessageTypeT[acp.UnstableListProvidersResponse](
		"UnstableListProvidersResponse",
		UnstableListProvidersResponseType, ToACPClient, true,
	)

	// UnstableSetProviderRequestMsg is the message type for requesting to set
	// a provider.
	UnstableSetProviderRequestMsg = newMessageTypeT[acp.UnstableSetProviderRequest](
		"UnstableSetProviderRequest",
		UnstableSetProviderRequestType, ToAgent, false,
	)

	// UnstableSetProviderResponseMsg is the message type for the response to a
	// set-provider request.
	UnstableSetProviderResponseMsg = newMessageTypeT[acp.UnstableSetProviderResponse](
		"UnstableSetProviderResponse",
		UnstableSetProviderResponseType, ToACPClient, true,
	)

	// UnstableDeleteSessionRequestMsg is the message type for requesting to
	// delete a session.
	UnstableDeleteSessionRequestMsg = newMessageTypeT[acp.UnstableDeleteSessionRequest](
		"UnstableDeleteSessionRequest",
		UnstableDeleteSessionRequestType, ToAgent, false,
	)

	// UnstableDeleteSessionResponseMsg is the message type for the response to
	// a delete-session request.
	UnstableDeleteSessionResponseMsg = newMessageTypeT[acp.UnstableDeleteSessionResponse](
		"UnstableDeleteSessionResponse",
		UnstableDeleteSessionResponseType, ToACPClient, true,
	)

	// CloseSessionRequestMsg is the message type for requesting to close a
	// session.
	CloseSessionRequestMsg = newMessageTypeT[acp.CloseSessionRequest](
		"CloseSessionRequest",
		CloseSessionRequestType, ToAgent, false,
	)

	// CloseSessionResponseMsg is the message type for the response to a
	// close-session request.
	CloseSessionResponseMsg = newMessageTypeT[acp.CloseSessionResponse](
		"CloseSessionResponse",
		CloseSessionResponseType, ToACPClient, true,
	)

	// InitializeRequestMsg is the message type for an initialize request.
	InitializeRequestMsg = newMessageTypeT[acp.InitializeRequest](
		"InitializeRequest",
		InitializeRequestType, ToAgent, false,
	)

	// InitializeResponseMsg is the message type for the response to an
	// initialize request.
	InitializeResponseMsg = newMessageTypeT[acp.InitializeResponse](
		"InitializeResponse",
		InitializeResponseType, ToACPClient, true,
	)

	// NewSessionRequestMsg is the message type for requesting a new session.
	NewSessionRequestMsg = newMessageTypeT[acp.NewSessionRequest](
		"NewSessionRequest",
		NewSessionRequestType, ToAgent, false,
	)

	// NewSessionResponseMsg is the message type for the response to a
	// new-session request.
	NewSessionResponseMsg = newMessageTypeT[acp.NewSessionResponse](
		"NewSessionResponse",
		NewSessionResponseType, ToACPClient, true,
	)

	// AuthenticateRequestMsg is the message type for an authenticate request.
	AuthenticateRequestMsg = newMessageTypeT[acp.AuthenticateRequest](
		"AuthenticateRequest",
		AuthenticateRequestType, ToAgent, false,
	)

	// AuthenticateResponseMsg is the message type for the response to an
	// authenticate request.
	AuthenticateResponseMsg = newMessageTypeT[acp.AuthenticateResponse](
		"AuthenticateResponse",
		AuthenticateResponseType, ToACPClient, true,
	)

	// LoadSessionRequestMsg is the message type for requesting to load a
	// session.
	LoadSessionRequestMsg = newMessageTypeT[acp.LoadSessionRequest](
		"LoadSessionRequest",
		LoadSessionRequestType, ToAgent, false,
	)

	// LoadSessionResponseMsg is the message type for the response to a
	// load-session request.
	LoadSessionResponseMsg = newMessageTypeT[acp.LoadSessionResponse](
		"LoadSessionResponse",
		LoadSessionResponseType, ToACPClient, true,
	)

	// PromptRequestMsg is the message type for a prompt request.
	PromptRequestMsg = newMessageTypeT[acp.PromptRequest](
		"PromptRequest",
		PromptRequestType, ToAgent, false,
	)

	// PromptResponseMsg is the message type for the response to a prompt.
	PromptResponseMsg = newMessageTypeT[acp.PromptResponse](
		"PromptResponse",
		PromptResponseType, ToACPClient, true,
	)

	// CancelNotificationMsg is the message type for a cancel notification.
	CancelNotificationMsg = newMessageTypeT[acp.CancelNotification](
		"CancelNotification",
		CancelNotificationType, ToAgent, false,
	)
)
View Source
var AllMessageTypes = []TypedMessage{
	RequestPermissionRequestMsg,
	RequestPermissionResponseMsg,
	WriteTextFileRequestMsg,
	WriteTextFileResponseMsg,
	ReadTextFileRequestMsg,
	ReadTextFileResponseMsg,
	CreateTerminalRequestMsg,
	CreateTerminalResponseMsg,
	TerminalOutputRequestMsg,
	TerminalOutputResponseMsg,
	ReleaseTerminalRequestMsg,
	ReleaseTerminalResponseMsg,
	WaitForTerminalExitRequestMsg,
	WaitForTerminalExitResponseMsg,
	KillTerminalRequestMsg,
	KillTerminalResponseMsg,
	SessionNotificationMsg,
	SetSessionModeRequestMsg,
	SetSessionModeResponseMsg,
	UnstableForkSessionRequestMsg,
	UnstableForkSessionResponseMsg,
	ListSessionsRequestMsg,
	ListSessionsResponseMsg,
	ResumeSessionRequestMsg,
	ResumeSessionResponseMsg,
	SetSessionConfigOptionRequestMsg,
	SetSessionConfigOptionResponseMsg,
	LogoutRequestMsg,
	LogoutResponseMsg,
	UnstableCloseNesRequestMsg,
	UnstableCloseNesResponseMsg,
	UnstableStartNesRequestMsg,
	UnstableStartNesResponseMsg,
	UnstableSuggestNesRequestMsg,
	UnstableSuggestNesResponseMsg,
	UnstableAcceptNesNotificationMsg,
	UnstableRejectNesNotificationMsg,
	UnstableDidChangeDocumentNotifMsg,
	UnstableDidCloseDocumentNotifMsg,
	UnstableDidFocusDocumentNotifMsg,
	UnstableDidOpenDocumentNotifMsg,
	UnstableDidSaveDocumentNotifMsg,
	UnstableDisableProviderRequestMsg,
	UnstableDisableProviderResponseMsg,
	UnstableListProvidersRequestMsg,
	UnstableListProvidersResponseMsg,
	UnstableSetProviderRequestMsg,
	UnstableSetProviderResponseMsg,
	UnstableDeleteSessionRequestMsg,
	UnstableDeleteSessionResponseMsg,
	CloseSessionRequestMsg,
	CloseSessionResponseMsg,
	InitializeRequestMsg,
	InitializeResponseMsg,
	NewSessionRequestMsg,
	NewSessionResponseMsg,
	AuthenticateRequestMsg,
	AuthenticateResponseMsg,
	LoadSessionRequestMsg,
	LoadSessionResponseMsg,
	PromptRequestMsg,
	PromptResponseMsg,
	CancelNotificationMsg,
}

AllMessageTypes is a list of all ACP message types. Used for looking up message types by ID or type.

Functions

func ACPContainer

func ACPContainer[T acpMessageTypes](msg T) (*protobyss.ACPContainer, error)

ACPContainer wraps an ACP message of any supported type into a protobyss.ACPContainer, recording its type id and marshalling the payload as JSON.

func ACPContainerList

func ACPContainerList[T acpMessageTypes](msgs ...T) (*protobyss.ACPContainerList, error)

ACPContainerList converts a variadic list of ACP messages into an ACPContainerList.

func ACPContainers

func ACPContainers[T acpMessageTypes](msgs ...T) ([]*protobyss.ACPContainer, error)

ACPContainers converts a variadic list of ACP messages into a slice of ACPContainers.

Types

type ACPPluginRouter

type ACPPluginRouter struct {

	// Client capability requests (agent -> client).
	OnRequestPermissionRequest    func(acp.RequestPermissionRequest) ([]*protobyss.ACPContainer, error)
	OnRequestPermissionResponse   func(acp.RequestPermissionResponse) ([]*protobyss.ACPContainer, error)
	OnWriteTextFileRequest        func(acp.WriteTextFileRequest) ([]*protobyss.ACPContainer, error)
	OnWriteTextFileResponse       func(acp.WriteTextFileResponse) ([]*protobyss.ACPContainer, error)
	OnReadTextFileRequest         func(acp.ReadTextFileRequest) ([]*protobyss.ACPContainer, error)
	OnCreateTerminalRequest       func(acp.CreateTerminalRequest) ([]*protobyss.ACPContainer, error)
	OnTerminalOutputRequest       func(acp.TerminalOutputRequest) ([]*protobyss.ACPContainer, error)
	OnReleaseTerminalRequest      func(acp.ReleaseTerminalRequest) ([]*protobyss.ACPContainer, error)
	OnWaitForTerminalExitRequest  func(acp.WaitForTerminalExitRequest) ([]*protobyss.ACPContainer, error)
	OnKillTerminalRequest         func(acp.KillTerminalRequest) ([]*protobyss.ACPContainer, error)
	OnSessionNotification         func(acp.SessionNotification) ([]*protobyss.ACPContainer, error)
	OnReadTextFileResponse        func(acp.ReadTextFileResponse) ([]*protobyss.ACPContainer, error)
	OnCreateTerminalResponse      func(acp.CreateTerminalResponse) ([]*protobyss.ACPContainer, error)
	OnTerminalOutputResponse      func(acp.TerminalOutputResponse) ([]*protobyss.ACPContainer, error)
	OnReleaseTerminalResponse     func(acp.ReleaseTerminalResponse) ([]*protobyss.ACPContainer, error)
	OnWaitForTerminalExitResponse func(acp.WaitForTerminalExitResponse) ([]*protobyss.ACPContainer, error)
	OnKillTerminalResponse        func(acp.KillTerminalResponse) ([]*protobyss.ACPContainer, error)

	// Agent requests (client -> agent).
	OnAuthenticateRequest            func(acp.AuthenticateRequest) ([]*protobyss.ACPContainer, error)
	OnInitializeRequest              func(acp.InitializeRequest) ([]*protobyss.ACPContainer, error)
	OnLogoutRequest                  func(acp.LogoutRequest) ([]*protobyss.ACPContainer, error)
	OnCancelNotification             func(acp.CancelNotification) ([]*protobyss.ACPContainer, error)
	OnCloseSessionRequest            func(acp.CloseSessionRequest) ([]*protobyss.ACPContainer, error)
	OnListSessionsRequest            func(acp.ListSessionsRequest) ([]*protobyss.ACPContainer, error)
	OnNewSessionRequest              func(acp.NewSessionRequest) ([]*protobyss.ACPContainer, error)
	OnPromptRequest                  func(acp.PromptRequest) ([]*protobyss.ACPContainer, error)
	OnResumeSessionRequest           func(acp.ResumeSessionRequest) ([]*protobyss.ACPContainer, error)
	OnSetSessionConfigOptionRequest  func(acp.SetSessionConfigOptionRequest) ([]*protobyss.ACPContainer, error)
	OnSetSessionModeRequest          func(acp.SetSessionModeRequest) ([]*protobyss.ACPContainer, error)
	OnLoadSessionRequest             func(acp.LoadSessionRequest) ([]*protobyss.ACPContainer, error)
	OnLoadSessionResponse            func(acp.LoadSessionResponse) ([]*protobyss.ACPContainer, error)
	OnSetSessionModeResponse         func(acp.SetSessionModeResponse) ([]*protobyss.ACPContainer, error)
	OnListSessionsResponse           func(acp.ListSessionsResponse) ([]*protobyss.ACPContainer, error)
	OnResumeSessionResponse          func(acp.ResumeSessionResponse) ([]*protobyss.ACPContainer, error)
	OnSetSessionConfigOptionResponse func(acp.SetSessionConfigOptionResponse) ([]*protobyss.ACPContainer, error)
	OnLogoutResponse                 func(acp.LogoutResponse) ([]*protobyss.ACPContainer, error)
	OnCloseSessionResponse           func(acp.CloseSessionResponse) ([]*protobyss.ACPContainer, error)
	OnInitializeResponse             func(acp.InitializeResponse) ([]*protobyss.ACPContainer, error)
	OnNewSessionResponse             func(acp.NewSessionResponse) ([]*protobyss.ACPContainer, error)
	OnAuthenticateResponse           func(acp.AuthenticateResponse) ([]*protobyss.ACPContainer, error)
	OnPromptResponse                 func(acp.PromptResponse) ([]*protobyss.ACPContainer, error)

	// Experimental agent requests (client -> agent).
	OnUnstableDidChangeDocumentNotification func(acp.UnstableDidChangeDocumentNotification) (
		[]*protobyss.ACPContainer, error)
	OnUnstableDidCloseDocumentNotification func(acp.UnstableDidCloseDocumentNotification) (
		[]*protobyss.ACPContainer, error)
	OnUnstableDidFocusDocumentNotification func(acp.UnstableDidFocusDocumentNotification) (
		[]*protobyss.ACPContainer, error)
	OnUnstableDidOpenDocumentNotification func(acp.UnstableDidOpenDocumentNotification) ([]*protobyss.ACPContainer, error)
	OnUnstableDidSaveDocumentNotification func(acp.UnstableDidSaveDocumentNotification) ([]*protobyss.ACPContainer, error)
	OnUnstableAcceptNesNotification       func(acp.UnstableAcceptNesNotification) ([]*protobyss.ACPContainer, error)
	OnUnstableCloseNesRequest             func(acp.UnstableCloseNesRequest) ([]*protobyss.ACPContainer, error)
	OnUnstableRejectNesNotification       func(acp.UnstableRejectNesNotification) ([]*protobyss.ACPContainer, error)
	OnUnstableStartNesRequest             func(acp.UnstableStartNesRequest) ([]*protobyss.ACPContainer, error)
	OnUnstableSuggestNesRequest           func(acp.UnstableSuggestNesRequest) ([]*protobyss.ACPContainer, error)
	OnUnstableDisableProviderRequest      func(acp.UnstableDisableProviderRequest) ([]*protobyss.ACPContainer, error)
	OnUnstableListProvidersRequest        func(acp.UnstableListProvidersRequest) ([]*protobyss.ACPContainer, error)
	OnUnstableSetProviderRequest          func(acp.UnstableSetProviderRequest) ([]*protobyss.ACPContainer, error)
	OnUnstableDeleteSessionRequest        func(acp.UnstableDeleteSessionRequest) ([]*protobyss.ACPContainer, error)
	OnUnstableForkSessionRequest          func(acp.UnstableForkSessionRequest) ([]*protobyss.ACPContainer, error)
	OnUnstableForkSessionResponse         func(acp.UnstableForkSessionResponse) ([]*protobyss.ACPContainer, error)
	OnUnstableCloseNesResponse            func(acp.UnstableCloseNesResponse) ([]*protobyss.ACPContainer, error)
	OnUnstableStartNesResponse            func(acp.UnstableStartNesResponse) ([]*protobyss.ACPContainer, error)
	OnUnstableSuggestNesResponse          func(acp.UnstableSuggestNesResponse) ([]*protobyss.ACPContainer, error)
	OnUnstableDisableProviderResponse     func(acp.UnstableDisableProviderResponse) ([]*protobyss.ACPContainer, error)
	OnUnstableListProvidersResponse       func(acp.UnstableListProvidersResponse) ([]*protobyss.ACPContainer, error)
	OnUnstableSetProviderResponse         func(acp.UnstableSetProviderResponse) ([]*protobyss.ACPContainer, error)
	OnUnstableDeleteSessionResponse       func(acp.UnstableDeleteSessionResponse) ([]*protobyss.ACPContainer, error)
	// contains filtered or unexported fields
}

ACPPluginRouter wraps a struct implementing one or more event handlers and manages translating protobyss.ACPContainer messages into appropriate acp structs, then dispatching ACP messages to the appropriate handler if configured.

func NewACPPluginRouter

func NewACPPluginRouter(v Initializer) *ACPPluginRouter

NewACPPluginRouter builds an ACPPluginRouter from an object that implements any subset of the *Handler interfaces. Unmatched callbacks are left nil.

func (*ACPPluginRouter) HandleMessage

HandleMessage dispatches an ACPContainer message to the registered handler matching its type, returning any produced containers or an error.

func (*ACPPluginRouter) Initialize added in v0.0.4

Initialize implements protobyss.ACPPluginPlugin

type Initializer added in v0.0.4

type Initializer interface {
	Initialize(ctx context.Context,
		req *protobyss.ACPPluginInitializeRequest) (*protobyss.ACPPluginInitializeResponse, error)
}

Initializer handles ACP plugin initialization callbacks.

type MessageDirection

type MessageDirection string

MessageDirection represents the direction of a message, either "to_acp_client" or "to_agent".

const (
	// ToACPClient is the direction of a message sent from the agent
	// to the ACP client.
	ToACPClient MessageDirection = "to_acp_client"

	// ToAgent is the direction of a message sent from the ACP client to the agent.
	ToAgent MessageDirection = "to_agent"
)

type MessageTypeID

type MessageTypeID int32

MessageTypeID is an enum used to identify which ACP struct the contents of a protobyss.ACPContainer should be unmarshalled into.

const (
	// MessageTypeNotExist is the zero value for MessageTypeID and does not
	// correspond to a real message.
	MessageTypeNotExist MessageTypeID = iota

	// RequestPermissionRequestType identifies an ACP request-permission request.
	RequestPermissionRequestType

	// RequestPermissionResponseType identifies an ACP request-permission response.
	RequestPermissionResponseType

	// WriteTextFileRequestType identifies an ACP write-text-file request.
	WriteTextFileRequestType

	// WriteTextFileResponseType identifies an ACP write-text-file response.
	WriteTextFileResponseType

	// ReadTextFileRequestType identifies an ACP read-text-file request.
	ReadTextFileRequestType

	// ReadTextFileResponseType identifies an ACP read-text-file response.
	ReadTextFileResponseType

	// CreateTerminalRequestType identifies an ACP create-terminal request.
	CreateTerminalRequestType

	// CreateTerminalResponseType identifies an ACP create-terminal response.
	CreateTerminalResponseType

	// TerminalOutputRequestType identifies an ACP terminal-output request.
	TerminalOutputRequestType

	// TerminalOutputResponseType identifies an ACP terminal-output response.
	TerminalOutputResponseType

	// ReleaseTerminalRequestType identifies an ACP release-terminal request.
	ReleaseTerminalRequestType

	// ReleaseTerminalResponseType identifies an ACP release-terminal response.
	ReleaseTerminalResponseType

	// WaitForTerminalExitRequestType identifies a terminal-exit-wait request.
	WaitForTerminalExitRequestType

	// WaitForTerminalExitResponseType identifies an ACP wait-for-terminal-exit
	// response.
	WaitForTerminalExitResponseType

	// KillTerminalRequestType identifies an ACP kill-terminal request.
	KillTerminalRequestType

	// KillTerminalResponseType identifies an ACP kill-terminal response.
	KillTerminalResponseType

	// SessionNotificationType identifies an ACP session notification.
	SessionNotificationType

	// SetSessionModeRequestType identifies an ACP set-session-mode request.
	SetSessionModeRequestType

	// SetSessionModeResponseType identifies an ACP set-session-mode response.
	SetSessionModeResponseType

	// UnstableForkSessionRequestType identifies an ACP fork-session request.
	UnstableForkSessionRequestType

	// UnstableForkSessionResponseType identifies an ACP fork-session response.
	UnstableForkSessionResponseType

	// ListSessionsRequestType identifies an ACP list-sessions request.
	ListSessionsRequestType

	// ListSessionsResponseType identifies an ACP list-sessions response.
	ListSessionsResponseType

	// ResumeSessionRequestType identifies an ACP resume-session request.
	ResumeSessionRequestType

	// ResumeSessionResponseType identifies an ACP resume-session response.
	ResumeSessionResponseType

	// SetSessionConfigOptionRequestType identifies an ACP
	// set-session-config-option request.
	SetSessionConfigOptionRequestType

	// SetSessionConfigOptionResponseType identifies an ACP
	// set-session-config-option response.
	SetSessionConfigOptionResponseType

	// LogoutRequestType identifies an ACP logout request.
	LogoutRequestType

	// LogoutResponseType identifies an ACP logout response.
	LogoutResponseType

	// UnstableCloseNesRequestType identifies an ACP unstable close-nes request.
	UnstableCloseNesRequestType

	// UnstableCloseNesResponseType identifies an ACP unstable close-nes response.
	UnstableCloseNesResponseType

	// UnstableStartNesRequestType identifies an ACP unstable start-nes request.
	UnstableStartNesRequestType

	// UnstableStartNesResponseType identifies an ACP unstable start-nes response.
	UnstableStartNesResponseType

	// UnstableSuggestNesRequestType identifies an ACP
	// suggest-nes request.
	UnstableSuggestNesRequestType

	// UnstableSuggestNesResponseType identifies an ACP suggest-nes response.
	UnstableSuggestNesResponseType

	// UnstableAcceptNesNotificationType identifies an ACP accept-nes notification.
	UnstableAcceptNesNotificationType

	// UnstableRejectNesNotificationType identifies an ACP reject-nes notification.
	UnstableRejectNesNotificationType

	// UnstableDidChangeDocumentNotificationType identifies an ACP
	// did-change-document notification.
	UnstableDidChangeDocumentNotificationType

	// UnstableDidCloseDocumentNotificationType identifies an ACP
	// did-close-document notification.
	UnstableDidCloseDocumentNotificationType

	// UnstableDidFocusDocumentNotificationType identifies an ACP
	// did-focus-document notification.
	UnstableDidFocusDocumentNotificationType

	// UnstableDidOpenDocumentNotificationType identifies an ACP
	// did-open-document notification.
	UnstableDidOpenDocumentNotificationType

	// UnstableDidSaveDocumentNotificationType identifies an ACP
	// did-save-document notification.
	UnstableDidSaveDocumentNotificationType

	// UnstableDisableProviderRequestType identifies an ACP
	// disable-provider request.
	UnstableDisableProviderRequestType

	// UnstableDisableProviderResponseType identifies an ACP
	// disable-provider response.
	UnstableDisableProviderResponseType

	// UnstableListProvidersRequestType identifies an ACP list-providers request.
	UnstableListProvidersRequestType

	// UnstableListProvidersResponseType identifies an ACP list-providers response.
	UnstableListProvidersResponseType

	// UnstableSetProviderRequestType identifies an ACP set-provider request.
	UnstableSetProviderRequestType

	// UnstableSetProviderResponseType identifies an ACP set-provider response.
	UnstableSetProviderResponseType

	// UnstableDeleteSessionRequestType identifies an ACP delete-session request.
	UnstableDeleteSessionRequestType

	// UnstableDeleteSessionResponseType identifies an ACP delete-session response.
	UnstableDeleteSessionResponseType

	// CloseSessionRequestType identifies an ACP close-session request.
	CloseSessionRequestType

	// CloseSessionResponseType identifies an ACP close-session response.
	CloseSessionResponseType

	// InitializeRequestType identifies an ACP initialize request.
	InitializeRequestType

	// InitializeResponseType identifies an ACP initialize response.
	InitializeResponseType

	// NewSessionRequestType identifies an ACP new-session request.
	NewSessionRequestType

	// NewSessionResponseType identifies an ACP new-session response.
	NewSessionResponseType

	// AuthenticateRequestType identifies an ACP authenticate request.
	AuthenticateRequestType

	// AuthenticateResponseType identifies an ACP authenticate response.
	AuthenticateResponseType

	// LoadSessionRequestType identifies an ACP load-session request.
	LoadSessionRequestType

	// LoadSessionResponseType identifies an ACP load-session response.
	LoadSessionResponseType

	// PromptRequestType identifies an ACP prompt request.
	PromptRequestType

	// PromptResponseType identifies an ACP prompt response.
	PromptResponseType

	// CancelNotificationType identifies an ACP cancel notification.
	CancelNotificationType
)

type MessageTypeT

type MessageTypeT[T any] struct {
	// contains filtered or unexported fields
}

MessageTypeT is a generic struct that holds a message type's ID and direction. It is primarily used to unmarshal ACP messages by their MessageTypeID.

func (*MessageTypeT[T]) Direction

func (m *MessageTypeT[T]) Direction() MessageDirection

Direction returns the direction of this message type.

func (*MessageTypeT[T]) IsResponse

func (m *MessageTypeT[T]) IsResponse() bool

IsResponse reports whether this message type is a response message.

func (*MessageTypeT[T]) Name

func (m *MessageTypeT[T]) Name() string

Name returns the name of this message type.

func (*MessageTypeT[T]) Type

func (m *MessageTypeT[T]) Type() reflect.Type

Type returns the concrete Go type this message unmarshals into.

func (*MessageTypeT[T]) TypeID

func (m *MessageTypeT[T]) TypeID() MessageTypeID

TypeID returns the identifier for this message type.

func (*MessageTypeT[T]) Unmarshal

func (m *MessageTypeT[T]) Unmarshal(content []byte) (T, error)

Unmarshal unmarshals the content into the message's concrete type.

func (*MessageTypeT[T]) UnmarshalAny

func (m *MessageTypeT[T]) UnmarshalAny(content []byte) (any, error)

UnmarshalAny unmarshals content into the message's concrete type, returned as any.

type OnAuthenticateRequestHandler

type OnAuthenticateRequestHandler interface {
	OnAuthenticateRequest(acp.AuthenticateRequest) ([]*protobyss.ACPContainer, error)
}

OnAuthenticateRequestHandler handles ACP authenticate-request callbacks.

type OnAuthenticateResponseHandler

type OnAuthenticateResponseHandler interface {
	OnAuthenticateResponse(acp.AuthenticateResponse) ([]*protobyss.ACPContainer, error)
}

OnAuthenticateResponseHandler handles ACP authenticate-response callbacks.

type OnCancelNotificationHandler

type OnCancelNotificationHandler interface {
	OnCancelNotification(acp.CancelNotification) ([]*protobyss.ACPContainer, error)
}

OnCancelNotificationHandler handles ACP cancel-notification callbacks.

type OnCloseSessionRequestHandler

type OnCloseSessionRequestHandler interface {
	OnCloseSessionRequest(acp.CloseSessionRequest) ([]*protobyss.ACPContainer, error)
}

OnCloseSessionRequestHandler handles ACP close-session-request callbacks.

type OnCloseSessionResponseHandler

type OnCloseSessionResponseHandler interface {
	OnCloseSessionResponse(acp.CloseSessionResponse) ([]*protobyss.ACPContainer, error)
}

OnCloseSessionResponseHandler handles ACP close-session-response callbacks.

type OnCreateTerminalRequestHandler

type OnCreateTerminalRequestHandler interface {
	OnCreateTerminalRequest(acp.CreateTerminalRequest) ([]*protobyss.ACPContainer, error)
}

OnCreateTerminalRequestHandler handles ACP create-terminal-request callbacks.

type OnCreateTerminalResponseHandler

type OnCreateTerminalResponseHandler interface {
	OnCreateTerminalResponse(acp.CreateTerminalResponse) ([]*protobyss.ACPContainer, error)
}

OnCreateTerminalResponseHandler handles ACP create-terminal-response callbacks.

type OnInitializeRequestHandler

type OnInitializeRequestHandler interface {
	OnInitializeRequest(acp.InitializeRequest) ([]*protobyss.ACPContainer, error)
}

OnInitializeRequestHandler handles ACP initialize-request callbacks.

type OnInitializeResponseHandler

type OnInitializeResponseHandler interface {
	OnInitializeResponse(acp.InitializeResponse) ([]*protobyss.ACPContainer, error)
}

OnInitializeResponseHandler handles ACP initialize-response callbacks.

type OnKillTerminalRequestHandler

type OnKillTerminalRequestHandler interface {
	OnKillTerminalRequest(acp.KillTerminalRequest) ([]*protobyss.ACPContainer, error)
}

OnKillTerminalRequestHandler handles ACP kill-terminal-request callbacks.

type OnKillTerminalResponseHandler

type OnKillTerminalResponseHandler interface {
	OnKillTerminalResponse(acp.KillTerminalResponse) ([]*protobyss.ACPContainer, error)
}

OnKillTerminalResponseHandler handles ACP kill-terminal-response callbacks.

type OnListSessionsRequestHandler

type OnListSessionsRequestHandler interface {
	OnListSessionsRequest(acp.ListSessionsRequest) ([]*protobyss.ACPContainer, error)
}

OnListSessionsRequestHandler handles ACP list-sessions-request callbacks.

type OnListSessionsResponseHandler

type OnListSessionsResponseHandler interface {
	OnListSessionsResponse(acp.ListSessionsResponse) ([]*protobyss.ACPContainer, error)
}

OnListSessionsResponseHandler handles ACP list-sessions-response callbacks.

type OnLoadSessionRequestHandler

type OnLoadSessionRequestHandler interface {
	OnLoadSessionRequest(acp.LoadSessionRequest) ([]*protobyss.ACPContainer, error)
}

OnLoadSessionRequestHandler handles ACP load-session-request callbacks.

type OnLoadSessionResponseHandler

type OnLoadSessionResponseHandler interface {
	OnLoadSessionResponse(acp.LoadSessionResponse) ([]*protobyss.ACPContainer, error)
}

OnLoadSessionResponseHandler handles ACP load-session-response callbacks.

type OnLogoutRequestHandler

type OnLogoutRequestHandler interface {
	OnLogoutRequest(acp.LogoutRequest) ([]*protobyss.ACPContainer, error)
}

OnLogoutRequestHandler handles ACP logout-request callbacks.

type OnLogoutResponseHandler

type OnLogoutResponseHandler interface {
	OnLogoutResponse(acp.LogoutResponse) ([]*protobyss.ACPContainer, error)
}

OnLogoutResponseHandler handles ACP logout-response callbacks.

type OnNewSessionRequestHandler

type OnNewSessionRequestHandler interface {
	OnNewSessionRequest(acp.NewSessionRequest) ([]*protobyss.ACPContainer, error)
}

OnNewSessionRequestHandler handles ACP new-session-request callbacks.

type OnNewSessionResponseHandler

type OnNewSessionResponseHandler interface {
	OnNewSessionResponse(acp.NewSessionResponse) ([]*protobyss.ACPContainer, error)
}

OnNewSessionResponseHandler handles ACP new-session-response callbacks.

type OnPromptRequestHandler

type OnPromptRequestHandler interface {
	OnPromptRequest(acp.PromptRequest) ([]*protobyss.ACPContainer, error)
}

OnPromptRequestHandler handles ACP prompt-request callbacks.

type OnPromptResponseHandler

type OnPromptResponseHandler interface {
	OnPromptResponse(acp.PromptResponse) ([]*protobyss.ACPContainer, error)
}

OnPromptResponseHandler handles ACP prompt-response callbacks.

type OnReadTextFileRequestHandler

type OnReadTextFileRequestHandler interface {
	OnReadTextFileRequest(acp.ReadTextFileRequest) ([]*protobyss.ACPContainer, error)
}

OnReadTextFileRequestHandler handles ACP read-text-file-request callbacks.

type OnReadTextFileResponseHandler

type OnReadTextFileResponseHandler interface {
	OnReadTextFileResponse(acp.ReadTextFileResponse) ([]*protobyss.ACPContainer, error)
}

OnReadTextFileResponseHandler handles ACP read-text-file-response callbacks.

type OnReleaseTerminalRequestHandler

type OnReleaseTerminalRequestHandler interface {
	OnReleaseTerminalRequest(acp.ReleaseTerminalRequest) ([]*protobyss.ACPContainer, error)
}

OnReleaseTerminalRequestHandler handles ACP release-terminal-request callbacks.

type OnReleaseTerminalResponseHandler

type OnReleaseTerminalResponseHandler interface {
	OnReleaseTerminalResponse(acp.ReleaseTerminalResponse) ([]*protobyss.ACPContainer, error)
}

OnReleaseTerminalResponseHandler handles ACP release-terminal-response callbacks.

type OnRequestPermissionRequestHandler

type OnRequestPermissionRequestHandler interface {
	OnRequestPermissionRequest(acp.RequestPermissionRequest) ([]*protobyss.ACPContainer, error)
}

OnRequestPermissionRequestHandler handles ACP request-permission-request callbacks.

type OnRequestPermissionResponseHandler

type OnRequestPermissionResponseHandler interface {
	OnRequestPermissionResponse(acp.RequestPermissionResponse) ([]*protobyss.ACPContainer, error)
}

OnRequestPermissionResponseHandler handles ACP request-permission-response callbacks.

type OnResumeSessionRequestHandler

type OnResumeSessionRequestHandler interface {
	OnResumeSessionRequest(acp.ResumeSessionRequest) ([]*protobyss.ACPContainer, error)
}

OnResumeSessionRequestHandler handles ACP resume-session-request callbacks.

type OnResumeSessionResponseHandler

type OnResumeSessionResponseHandler interface {
	OnResumeSessionResponse(acp.ResumeSessionResponse) ([]*protobyss.ACPContainer, error)
}

OnResumeSessionResponseHandler handles ACP resume-session-response callbacks.

type OnSessionNotificationHandler

type OnSessionNotificationHandler interface {
	OnSessionNotification(acp.SessionNotification) ([]*protobyss.ACPContainer, error)
}

OnSessionNotificationHandler handles ACP session-notification callbacks.

type OnSetSessionConfigOptionRequestHandler

type OnSetSessionConfigOptionRequestHandler interface {
	OnSetSessionConfigOptionRequest(acp.SetSessionConfigOptionRequest) ([]*protobyss.ACPContainer, error)
}

OnSetSessionConfigOptionRequestHandler handles ACP set-session-config-option-request callbacks.

type OnSetSessionConfigOptionResponseHandler

type OnSetSessionConfigOptionResponseHandler interface {
	OnSetSessionConfigOptionResponse(acp.SetSessionConfigOptionResponse) ([]*protobyss.ACPContainer, error)
}

OnSetSessionConfigOptionResponseHandler handles ACP set-session-config-option-response callbacks.

type OnSetSessionModeRequestHandler

type OnSetSessionModeRequestHandler interface {
	OnSetSessionModeRequest(acp.SetSessionModeRequest) ([]*protobyss.ACPContainer, error)
}

OnSetSessionModeRequestHandler handles ACP set-session-mode-request callbacks.

type OnSetSessionModeResponseHandler

type OnSetSessionModeResponseHandler interface {
	OnSetSessionModeResponse(acp.SetSessionModeResponse) ([]*protobyss.ACPContainer, error)
}

OnSetSessionModeResponseHandler handles ACP set-session-mode-response callbacks.

type OnTerminalOutputRequestHandler

type OnTerminalOutputRequestHandler interface {
	OnTerminalOutputRequest(acp.TerminalOutputRequest) ([]*protobyss.ACPContainer, error)
}

OnTerminalOutputRequestHandler handles ACP terminal-output-request callbacks.

type OnTerminalOutputResponseHandler

type OnTerminalOutputResponseHandler interface {
	OnTerminalOutputResponse(acp.TerminalOutputResponse) ([]*protobyss.ACPContainer, error)
}

OnTerminalOutputResponseHandler handles ACP terminal-output-response callbacks.

type OnUnstableAcceptNesNotificationHandler

type OnUnstableAcceptNesNotificationHandler interface {
	OnUnstableAcceptNesNotification(acp.UnstableAcceptNesNotification) ([]*protobyss.ACPContainer, error)
}

OnUnstableAcceptNesNotificationHandler handles ACP unstable-accept-nes-notification callbacks.

type OnUnstableCloseNesRequestHandler

type OnUnstableCloseNesRequestHandler interface {
	OnUnstableCloseNesRequest(acp.UnstableCloseNesRequest) ([]*protobyss.ACPContainer, error)
}

OnUnstableCloseNesRequestHandler handles ACP unstable-close-nes-request callbacks.

type OnUnstableCloseNesResponseHandler

type OnUnstableCloseNesResponseHandler interface {
	OnUnstableCloseNesResponse(acp.UnstableCloseNesResponse) ([]*protobyss.ACPContainer, error)
}

OnUnstableCloseNesResponseHandler handles ACP unstable-close-nes-response callbacks.

type OnUnstableDeleteSessionRequestHandler

type OnUnstableDeleteSessionRequestHandler interface {
	OnUnstableDeleteSessionRequest(acp.UnstableDeleteSessionRequest) ([]*protobyss.ACPContainer, error)
}

OnUnstableDeleteSessionRequestHandler handles ACP unstable-delete-session-request callbacks.

type OnUnstableDeleteSessionResponseHandler

type OnUnstableDeleteSessionResponseHandler interface {
	OnUnstableDeleteSessionResponse(acp.UnstableDeleteSessionResponse) ([]*protobyss.ACPContainer, error)
}

OnUnstableDeleteSessionResponseHandler handles ACP unstable-delete-session-response callbacks.

type OnUnstableDidChangeDocumentNotificationHandler

type OnUnstableDidChangeDocumentNotificationHandler interface {
	OnUnstableDidChangeDocumentNotification(acp.UnstableDidChangeDocumentNotification) ([]*protobyss.ACPContainer, error)
}

OnUnstableDidChangeDocumentNotificationHandler handles ACP unstable-did-change-document-notification callbacks.

type OnUnstableDidCloseDocumentNotificationHandler

type OnUnstableDidCloseDocumentNotificationHandler interface {
	OnUnstableDidCloseDocumentNotification(acp.UnstableDidCloseDocumentNotification) ([]*protobyss.ACPContainer, error)
}

OnUnstableDidCloseDocumentNotificationHandler handles ACP unstable-did-close-document-notification callbacks.

type OnUnstableDidFocusDocumentNotificationHandler

type OnUnstableDidFocusDocumentNotificationHandler interface {
	OnUnstableDidFocusDocumentNotification(acp.UnstableDidFocusDocumentNotification) ([]*protobyss.ACPContainer, error)
}

OnUnstableDidFocusDocumentNotificationHandler handles ACP unstable-did-focus-document-notification callbacks.

type OnUnstableDidOpenDocumentNotificationHandler

type OnUnstableDidOpenDocumentNotificationHandler interface {
	OnUnstableDidOpenDocumentNotification(acp.UnstableDidOpenDocumentNotification) ([]*protobyss.ACPContainer, error)
}

OnUnstableDidOpenDocumentNotificationHandler handles ACP unstable-did-open-document-notification callbacks.

type OnUnstableDidSaveDocumentNotificationHandler

type OnUnstableDidSaveDocumentNotificationHandler interface {
	OnUnstableDidSaveDocumentNotification(acp.UnstableDidSaveDocumentNotification) ([]*protobyss.ACPContainer, error)
}

OnUnstableDidSaveDocumentNotificationHandler handles ACP unstable-did-save-document-notification callbacks.

type OnUnstableDisableProviderRequestHandler

type OnUnstableDisableProviderRequestHandler interface {
	OnUnstableDisableProviderRequest(acp.UnstableDisableProviderRequest) ([]*protobyss.ACPContainer, error)
}

OnUnstableDisableProviderRequestHandler handles ACP unstable-disable-provider-request callbacks.

type OnUnstableDisableProviderResponseHandler

type OnUnstableDisableProviderResponseHandler interface {
	OnUnstableDisableProviderResponse(acp.UnstableDisableProviderResponse) ([]*protobyss.ACPContainer, error)
}

OnUnstableDisableProviderResponseHandler handles ACP unstable-disable-provider-response callbacks.

type OnUnstableForkSessionRequestHandler

type OnUnstableForkSessionRequestHandler interface {
	OnUnstableForkSessionRequest(acp.UnstableForkSessionRequest) ([]*protobyss.ACPContainer, error)
}

OnUnstableForkSessionRequestHandler handles ACP unstable-fork-session-request callbacks.

type OnUnstableForkSessionResponseHandler

type OnUnstableForkSessionResponseHandler interface {
	OnUnstableForkSessionResponse(acp.UnstableForkSessionResponse) ([]*protobyss.ACPContainer, error)
}

OnUnstableForkSessionResponseHandler handles ACP unstable-fork-session-response callbacks.

type OnUnstableListProvidersRequestHandler

type OnUnstableListProvidersRequestHandler interface {
	OnUnstableListProvidersRequest(acp.UnstableListProvidersRequest) ([]*protobyss.ACPContainer, error)
}

OnUnstableListProvidersRequestHandler handles ACP unstable-list-providers-request callbacks.

type OnUnstableListProvidersResponseHandler

type OnUnstableListProvidersResponseHandler interface {
	OnUnstableListProvidersResponse(acp.UnstableListProvidersResponse) ([]*protobyss.ACPContainer, error)
}

OnUnstableListProvidersResponseHandler handles ACP unstable-list-providers-response callbacks.

type OnUnstableRejectNesNotificationHandler

type OnUnstableRejectNesNotificationHandler interface {
	OnUnstableRejectNesNotification(acp.UnstableRejectNesNotification) ([]*protobyss.ACPContainer, error)
}

OnUnstableRejectNesNotificationHandler handles ACP unstable-reject-nes-notification callbacks.

type OnUnstableSetProviderRequestHandler

type OnUnstableSetProviderRequestHandler interface {
	OnUnstableSetProviderRequest(acp.UnstableSetProviderRequest) ([]*protobyss.ACPContainer, error)
}

OnUnstableSetProviderRequestHandler handles ACP unstable-set-provider-request callbacks.

type OnUnstableSetProviderResponseHandler

type OnUnstableSetProviderResponseHandler interface {
	OnUnstableSetProviderResponse(acp.UnstableSetProviderResponse) ([]*protobyss.ACPContainer, error)
}

OnUnstableSetProviderResponseHandler handles ACP unstable-set-provider-response callbacks.

type OnUnstableStartNesRequestHandler

type OnUnstableStartNesRequestHandler interface {
	OnUnstableStartNesRequest(acp.UnstableStartNesRequest) ([]*protobyss.ACPContainer, error)
}

OnUnstableStartNesRequestHandler handles ACP unstable-start-nes-request callbacks.

type OnUnstableStartNesResponseHandler

type OnUnstableStartNesResponseHandler interface {
	OnUnstableStartNesResponse(acp.UnstableStartNesResponse) ([]*protobyss.ACPContainer, error)
}

OnUnstableStartNesResponseHandler handles ACP unstable-start-nes-response callbacks.

type OnUnstableSuggestNesRequestHandler

type OnUnstableSuggestNesRequestHandler interface {
	OnUnstableSuggestNesRequest(acp.UnstableSuggestNesRequest) ([]*protobyss.ACPContainer, error)
}

OnUnstableSuggestNesRequestHandler handles ACP unstable-suggest-nes-request callbacks.

type OnUnstableSuggestNesResponseHandler

type OnUnstableSuggestNesResponseHandler interface {
	OnUnstableSuggestNesResponse(acp.UnstableSuggestNesResponse) ([]*protobyss.ACPContainer, error)
}

OnUnstableSuggestNesResponseHandler handles ACP unstable-suggest-nes-response callbacks.

type OnWaitForTerminalExitRequestHandler

type OnWaitForTerminalExitRequestHandler interface {
	OnWaitForTerminalExitRequest(acp.WaitForTerminalExitRequest) ([]*protobyss.ACPContainer, error)
}

OnWaitForTerminalExitRequestHandler handles ACP wait-for-terminal-exit-request callbacks.

type OnWaitForTerminalExitResponseHandler

type OnWaitForTerminalExitResponseHandler interface {
	OnWaitForTerminalExitResponse(acp.WaitForTerminalExitResponse) ([]*protobyss.ACPContainer, error)
}

OnWaitForTerminalExitResponseHandler handles ACP wait-for-terminal-exit-response callbacks.

type OnWriteTextFileRequestHandler

type OnWriteTextFileRequestHandler interface {
	OnWriteTextFileRequest(acp.WriteTextFileRequest) ([]*protobyss.ACPContainer, error)
}

OnWriteTextFileRequestHandler handles ACP write-text-file-request callbacks.

type OnWriteTextFileResponseHandler

type OnWriteTextFileResponseHandler interface {
	OnWriteTextFileResponse(acp.WriteTextFileResponse) ([]*protobyss.ACPContainer, error)
}

OnWriteTextFileResponseHandler handles ACP write-text-file-response callbacks.

type ProxyLocation

type ProxyLocation string

ProxyLocation stores the location of a proxy, i.e. whether it is on the host or inside the container.

const (
	// LocationHost indicates the proxy is running on the host.
	LocationHost ProxyLocation = "host"

	// LocationContainer indicates the proxy is running in the container.
	LocationContainer ProxyLocation = "container"
)

type TypedMessage

type TypedMessage interface {
	Name() string
	TypeID() MessageTypeID
	Type() reflect.Type
	UnmarshalAny(content []byte) (any, error)
	Direction() MessageDirection
	IsResponse() bool
}

TypedMessage is the common interface for generic Message[T] values so they can be stored together in a single heterogeneous registry.

func GetMessageTypeByID

func GetMessageTypeByID(msgTypeID int32) (TypedMessage, error)

GetMessageTypeByID returns the TypedMessage for the given message type ID, or an error if not found.

func GetMessageTypeByType

func GetMessageTypeByType(msg any) (TypedMessage, error)

GetMessageTypeByType returns the TypedMessage for the given message, or an error if not found (or if the message type is not an ACP message).

Jump to

Keyboard shortcuts

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