Help us shape the future of Go! Take the 2026 Go Developer Survey

sessionadapter

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sessionadapter bridges mecatui's session interface to its gRPC client.

Index

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 New

func New(cl Client, workspace, mode, _ string) *Adapter

New constructs mecatui's session adapter.

func (*Adapter) CloseSession

func (s *Adapter) CloseSession(ctx context.Context, id string) error

CloseSession releases a server-side session.

func (*Adapter) CreateSession

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

func (s *Adapter) DebugTargetID() string

DebugTargetID returns the resolved debug target, if any.

func (*Adapter) ForkSession

func (s *Adapter) ForkSession(ctx context.Context, srcID, reasoningEffort string) (string, error)

ForkSession forks a session while preserving its title and model.

func (*Adapter) GetSession

func (s *Adapter) GetSession(ctx context.Context, id string) (client.SessionSnapshot, error)

GetSession returns the client-visible session snapshot.

func (*Adapter) SetMode

func (s *Adapter) SetMode(ctx context.Context, id, mode string) (string, error)

SetMode changes a session's permission mode.

func (*Adapter) WithDebugTarget

func (s *Adapter) WithDebugTarget(target string, mcpServers []string) *Adapter

WithDebugTarget binds a dedicated debug session to target when non-empty.

type Client

Client is the gRPC session surface used by Adapter.

Jump to

Keyboard shortcuts

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