Documentation
¶
Index ¶
- func ClearOAuthTokenStandalone(globalConfig *config.Config, serverName string, logger *zap.SugaredLogger) error
- type Client
- func (c *Client) CallTool(ctx context.Context, toolName string, args map[string]interface{}) (*mcp.CallToolResult, error)
- func (c *Client) ClearOAuthToken(_ context.Context) error
- func (c *Client) Close() error
- func (c *Client) Connect(ctx context.Context) error
- func (c *Client) Disconnect() error
- func (c *Client) DisconnectWithContext(ctx context.Context) error
- func (c *Client) GetOAuthStatus() (string, error)
- func (c *Client) GetServerInfo() *mcp.InitializeResult
- func (c *Client) IsConnected() bool
- func (c *Client) ListTools(ctx context.Context) ([]*config.ToolMetadata, error)
- func (c *Client) TriggerManualOAuth(ctx context.Context) error
- func (c *Client) TriggerManualOAuthWithForce(ctx context.Context, force bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearOAuthTokenStandalone ¶ added in v0.74.0
func ClearOAuthTokenStandalone(globalConfig *config.Config, serverName string, logger *zap.SugaredLogger) error
ClearOAuthTokenStandalone discards serverName's stored OAuth token for the standalone `auth logout` (no daemon) without building a client. The clear is a delete on the bucket key alone, so an OAuth token key reference that no longer resolves does not stop it (Spec 123 review; any other key error still does): the documented recovery for a lost key is this logout, and the usual way a key is lost is a key reference that no longer resolves (a missing secret mount or key file), which NewClient refuses with exit 4. Opening without a key is then safe because nothing is written to oauth_tokens: the row is deleted whatever its shape (plaintext, sealed under any key, or damaged). A running core holding the lock is still a *storage.DatabaseLockedError.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a simple interface for CLI operations with enhanced debugging
func (*Client) CallTool ¶
func (c *Client) CallTool(ctx context.Context, toolName string, args map[string]interface{}) (*mcp.CallToolResult, error)
CallTool executes a tool (for future CLI extensions)
func (*Client) ClearOAuthToken ¶
ClearOAuthToken clears the OAuth token from persistent storage for this server. This is used by the CLI logout command in standalone mode.
func (*Client) DisconnectWithContext ¶
DisconnectWithContext closes the connection with context timeout
func (*Client) GetOAuthStatus ¶
GetOAuthStatus returns the OAuth authentication status for the server
func (*Client) GetServerInfo ¶
func (c *Client) GetServerInfo() *mcp.InitializeResult
GetServerInfo returns server information
func (*Client) IsConnected ¶
IsConnected returns connection status
func (*Client) TriggerManualOAuth ¶
TriggerManualOAuth manually triggers OAuth authentication flow for the server
func (*Client) TriggerManualOAuthWithForce ¶
TriggerManualOAuthWithForce manually triggers OAuth authentication flow for the server If force is true, OAuth flow will be triggered even if initial errors don't seem OAuth-related