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

command

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxOutputBytes        = maxCommandOutputBytes
	MaxConcurrentSessions = maxConcurrentCommandSessions
	MaxRetainedSessions   = maxRetainedCommandSessions
)

Variables

This section is empty.

Functions

func AddRuntimeProperties

func AddRuntimeProperties(_ map[string]any)

func Description

func Description() string

func OutputLimit

func OutputLimit(args map[string]any) int

func WaitForSessionsCompletion

func WaitForSessionsCompletion(sessions []*session.Session, timeout time.Duration) ([]*session.Session, []string)

func WorkdirDescription

func WorkdirDescription() string

Types

type CommandContext

type CommandContext func() (context.Context, error)

type ConfigProvider

type ConfigProvider func() config.Config

type InvocationPreview

type InvocationPreview struct {
	Workdir string
	Env     []string
}

type Result

type Result = toolcore.Result

type Service

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

func New

func New(configProvider ConfigProvider, ws *workspace.Workspace, envs *envstore.Store, sessions *session.Store, resolveSkill SkillResolver, commandContext CommandContext) *Service

func (*Service) Act

func (s *Service) Act(args map[string]any) (Result, error)

func (*Service) BeginClose added in v0.8.1

func (s *Service) BeginClose()

BeginClose 先关闭新的 command reservation 入口。 Runtime 会在取消共享 commandCtx 之前等待 startup 窗口排空,避免半启动进程被抢占。

func (*Service) Close

func (s *Service) Close() error

func (*Service) CommandEnv

func (s *Service) CommandEnv(skillName string, extra map[string]any) ([]string, error)

func (*Service) Exec

func (svc *Service) Exec(ctx context.Context, args map[string]any) (Result, error)

func (*Service) InternalCommandEnv

func (s *Service) InternalCommandEnv(extra map[string]string) ([]string, error)

func (*Service) KillAll

func (svc *Service) KillAll(args map[string]any) (Result, error)

func (*Service) KillSession

func (s *Service) KillSession(args map[string]any) (Result, error)

func (*Service) ListSessions

func (s *Service) ListSessions() (Result, error)

func (*Service) Observe

func (s *Service) Observe(args map[string]any) (Result, error)

func (*Service) PreparePreview

func (s *Service) PreparePreview(args map[string]any, command string) (InvocationPreview, error)

func (*Service) SessionStatus

func (s *Service) SessionStatus(args map[string]any) (Result, error)

func (*Service) Store

func (s *Service) Store() *session.Store

func (*Service) WaitForStarts added in v0.8.1

func (s *Service) WaitForStarts() error

func (*Service) WriteStdin

func (s *Service) WriteStdin(args map[string]any) (Result, error)

type SessionStore

type SessionStore = session.Store

func NewSessionStore

func NewSessionStore() *SessionStore

type SkillResolver

type SkillResolver func(skill string) (string, error)

type ToolError

type ToolError = toolcore.ToolError

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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