cmd

package
v0.1.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// DefaultAuthWaitTimeout is the default timeout for waiting for authentication to complete.
	DefaultAuthWaitTimeout = 2 * time.Minute
	// DefaultAuthPollInterval is the default interval for polling authentication status.
	DefaultAuthPollInterval = 500 * time.Millisecond
	// DefaultStatusCheckTimeout is the timeout for checking connection status and fetching resources.
	DefaultStatusCheckTimeout = 10 * time.Second
)

Auth wait timeout constants.

View Source
const (
	// ExitCodeSuccess indicates successful execution.
	ExitCodeSuccess = 0
	// ExitCodeError indicates a general error (command failed, invalid arguments).
	ExitCodeError = 1
	// ExitCodeAuthRequired indicates authentication is required but not available.
	ExitCodeAuthRequired = 2
	// ExitCodeAuthFailed indicates the OAuth flow failed.
	ExitCodeAuthFailed = 3
)

Exit codes for CLI commands. These follow common conventions and are documented in docs/reference/cli/auth.md

View Source
const (
	// DefaultOAuthCallbackPort is the port used for OAuth callback during authentication.
	DefaultOAuthCallbackPort = 3000
)

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute is the main entry point for the CLI application. It initializes and executes the root command, which in turn handles subcommands and flags. This function is called by main.main().

func GetVersion

func GetVersion() string

GetVersion returns the current version of the application. This can be used by other commands to access the build version.

func SetVersion

func SetVersion(v string)

SetVersion sets the version for the root command. This function is typically called from the main package to inject the application version at build time.

Types

type AuthHandlerOptions

type AuthHandlerOptions struct {
	// NoSilentRefresh disables silent re-authentication attempts.
	// When true, Login() always uses interactive authentication.
	NoSilentRefresh bool
}

AuthHandlerOptions configures the auth handler creation.

type AuthWaitConfig

type AuthWaitConfig struct {
	// WaitForCompletion enables polling for auth completion.
	WaitForCompletion bool
	// Timeout is the maximum time to wait for completion.
	Timeout time.Duration
	// PollInterval is how often to check auth status.
	PollInterval time.Duration
}

AuthWaitConfig configures how long to wait for authentication completion.

func DefaultAuthWaitConfig

func DefaultAuthWaitConfig() AuthWaitConfig

DefaultAuthWaitConfig returns a default configuration for auth waiting.

type MCPFilterOptions

type MCPFilterOptions struct {
	// Pattern is a wildcard pattern to match against names (* and ? supported)
	Pattern string
	// Description is a case-insensitive substring to match against descriptions
	Description string
	// Server filters by server name (case-insensitive prefix match)
	Server string
}

MCPFilterOptions contains filter criteria for MCP primitives

func (MCPFilterOptions) HasMCPOnlyFilters

func (o MCPFilterOptions) HasMCPOnlyFilters() bool

HasMCPOnlyFilters returns true if any MCP-specific filters are set

func (MCPFilterOptions) IsEmpty

func (o MCPFilterOptions) IsEmpty() bool

IsEmpty returns true if no filters are set

Jump to

Keyboard shortcuts

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