sdkserver

package
v0.9.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Creating runState = "creating"
	Running  runState = "running"
	Continue runState = "continue"
	Finished runState = "finished"
	Error    runState = "error"

	CallConfirm runner.EventType = "callConfirm"
	Prompt      runner.EventType = "prompt"
)

Variables

This section is empty.

Functions

func EmbeddedStart

func EmbeddedStart(ctx context.Context, options ...Options) (string, func(), error)

EmbeddedStart allows running the server as an embedded process that may use Stdin for input. It returns the address the server is listening on.

func Run

func Run(ctx context.Context, opts Options) error

Run will start the server and block until the server is shut down.

Types

type Options

type Options struct {
	gptscript.Options

	MCPLoader                  loader.MCPLoader
	ListenAddress              string
	DatasetTool, WorkspaceTool string
	ServerToolsEnv             []string
	Debug                      bool
	DisableServerErrorLogging  bool
}

type Session

type Session struct {
	// contains filtered or unexported fields
}

func (*Session) Event

func (s *Session) Event(e runner.Event)

func (*Session) Pause

func (s *Session) Pause() func()

func (*Session) Stop

func (s *Session) Stop(ctx context.Context, output string, err error)

type SessionFactory

type SessionFactory struct {
	// contains filtered or unexported fields
}

func NewSessionFactory

func NewSessionFactory(events *broadcaster.Broadcaster[event]) *SessionFactory

func (SessionFactory) Pause

func (s SessionFactory) Pause() func()

func (SessionFactory) Start

func (s SessionFactory) Start(ctx context.Context, prg *types.Program, env []string, input string) (runner.Monitor, error)

Jump to

Keyboard shortcuts

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