command

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package command provides command execution functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUpstream

func NewUpstream() upstream.Upstream

NewUpstream creates a new instance of CommandUpstream.

Types

type Upstream

type Upstream struct{}

Upstream implements the upstream.Upstream interface for services that are exposed as command-line tools. It discovers and registers tools based on a list of commands defined in the service configuration.

func (*Upstream) Register

func (u *Upstream) Register(
	ctx context.Context,
	serviceConfig *configv1.UpstreamServiceConfig,
	toolManager tool.ManagerInterface,
	promptManager prompt.ManagerInterface,
	resourceManager resource.ManagerInterface,
	isReload bool,
) (string, []*configv1.ToolDefinition, []*configv1.ResourceDefinition, error)

Register processes the configuration for a command-line service, creates a new tool for each defined command, and registers them with the tool manager.

func (*Upstream) Shutdown

func (u *Upstream) Shutdown(_ context.Context) error

Shutdown implements the upstream.Upstream interface.

Jump to

Keyboard shortcuts

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