Documentation
¶
Overview ¶
Package sessionadapter bridges mecatui's session interface to its gRPC client.
Index ¶
- type Adapter
- func (s *Adapter) CloseSession(ctx context.Context, id string) error
- func (s *Adapter) CreateSession(ctx context.Context, sel client.ModelSelection, mode string) (string, client.Capabilities, client.ResolvedModel, error)
- func (s *Adapter) CreateSessionInWorkspace(ctx context.Context, _ string, sel client.ModelSelection, mode string) (string, client.Capabilities, client.ResolvedModel, error)
- func (s *Adapter) CreateSessionWithCarryover(ctx context.Context, sourceSessionID string, sel client.ModelSelection, ...) (string, client.Capabilities, client.ResolvedModel, error)
- func (s *Adapter) DebugTargetID() string
- func (s *Adapter) ForkSession(ctx context.Context, srcID, reasoningEffort string) (string, error)
- func (s *Adapter) GetSession(ctx context.Context, id string) (client.SessionSnapshot, error)
- func (s *Adapter) SetMode(ctx context.Context, id, mode string) (string, error)
- func (s *Adapter) WithDebugTarget(target string, mcpServers []string) *Adapter
- type Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter fixes launch-time mode while preserving mecatui's per-call model selection.
func (*Adapter) CloseSession ¶
CloseSession releases a server-side session.
func (*Adapter) CreateSession ¶
func (s *Adapter) CreateSession(ctx context.Context, sel client.ModelSelection, mode string) (string, client.Capabilities, client.ResolvedModel, error)
CreateSession creates a session in the launch workspace.
func (*Adapter) CreateSessionInWorkspace ¶
func (s *Adapter) CreateSessionInWorkspace(ctx context.Context, _ string, sel client.ModelSelection, mode string) (string, client.Capabilities, client.ResolvedModel, error)
CreateSessionInWorkspace creates a session in an explicitly selected workspace.
func (*Adapter) CreateSessionWithCarryover ¶
func (s *Adapter) CreateSessionWithCarryover(ctx context.Context, sourceSessionID string, sel client.ModelSelection, _ string) (string, client.Capabilities, client.ResolvedModel, error)
CreateSessionWithCarryover creates a session seeded from an existing session.
func (*Adapter) DebugTargetID ¶
DebugTargetID returns the resolved debug target, if any.
func (*Adapter) ForkSession ¶
ForkSession forks a session while preserving its title and model.
func (*Adapter) GetSession ¶
GetSession returns the client-visible session snapshot.
type Client ¶
type Client interface {
CreateSession(context.Context, mecatlv1.PermissionMode, client.ModelSelection) (string, client.Capabilities, client.ResolvedModel, error)
CreateSessionWithCarryover(context.Context, client.ModelSelection, string) (string, client.Capabilities, client.ResolvedModel, error)
CloseSession(context.Context, string) error
GetSession(context.Context, string) (client.SessionSnapshot, error)
SetMode(context.Context, string, string) (string, error)
ForkSession(context.Context, string, string, string) (string, error)
}
Client is the gRPC session surface used by Adapter.