sessionadapter

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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