client

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL string
	// contains filtered or unexported fields
}

Client is a lightweight API client replacing the previous SQLite backend

func NewClient

func NewClient(baseURL, token string) *Client

NewClient constructs a client with explicit baseURL and token

func NewClientFromEnv

func NewClientFromEnv() (*Client, error)

NewClientFromEnv constructs a client using environment variables

func (*Client) Close

func (c *Client) Close() error

Close is a no-op in API mode

func (*Client) DeleteAgent

func (c *Client) DeleteAgent(name, version string) error

DeleteAgent deletes an agent from the registry

func (*Client) DeleteMCPServer

func (c *Client) DeleteMCPServer(name, version string) error

DeleteMCPServer deletes an MCP server from the registry by setting its status to deleted

func (*Client) DeleteSkill

func (c *Client) DeleteSkill(name, version string) error

DeleteSkill deletes a skill from the registry Note: This uses DELETE HTTP method. If the endpoint doesn't exist, it will return an error.

func (*Client) DeployAgent

func (c *Client) DeployAgent(name, version string, config map[string]string, runtimeTarget string) (*DeploymentResponse, error)

DeployAgent deploys an agent with configuration

func (*Client) DeployServer

func (c *Client) DeployServer(name, version string, config map[string]string, preferRemote bool, runtimeTarget string) (*DeploymentResponse, error)

DeployServer deploys a server with configuration

func (*Client) GetAgentByName

func (c *Client) GetAgentByName(name string) (*models.AgentResponse, error)

func (*Client) GetAgentByNameAndVersion

func (c *Client) GetAgentByNameAndVersion(name, version string) (*models.AgentResponse, error)

GetAgentByNameAndVersion returns a specific version of an agent

func (*Client) GetAgentByNameAndVersionAdmin

func (c *Client) GetAgentByNameAndVersionAdmin(name, version string) (*models.AgentResponse, error)

GetAgentByNameAndVersionAdmin returns a specific version of an agent (admin endpoint - includes unpublished)

func (*Client) GetAgents

func (c *Client) GetAgents() ([]*models.AgentResponse, error)

GetAgents returns all agents from connected registries

func (*Client) GetAllServerVersionsAdmin

func (c *Client) GetAllServerVersionsAdmin(name string) ([]v0.ServerResponse, error)

GetAllServerVersionsAdmin returns all versions of a server by name (admin endpoint - includes unpublished)

func (*Client) GetAllServers

func (c *Client) GetAllServers() ([]*v0.ServerResponse, error)

func (*Client) GetDeployedServerByNameAndVersion

func (c *Client) GetDeployedServerByNameAndVersion(name string, version string) (*DeploymentResponse, error)

GetDeployedServerByNameAndVersion retrieves a specific deployment by name and version

func (*Client) GetDeployedServers

func (c *Client) GetDeployedServers() ([]*DeploymentResponse, error)

GetDeployedServers retrieves all deployed servers

func (*Client) GetPublishedServers

func (c *Client) GetPublishedServers() ([]*v0.ServerResponse, error)

GetPublishedServers returns all published MCP servers

func (*Client) GetServerByName

func (c *Client) GetServerByName(name string, publishedOnly bool) (*v0.ServerResponse, error)

GetServerByName returns a server by name (latest version)

func (*Client) GetServerByNameAndVersion

func (c *Client) GetServerByNameAndVersion(name, version string, publishedOnly bool) (*v0.ServerResponse, error)

GetServerByNameAndVersion returns a specific version of a server

func (*Client) GetServerVersions

func (c *Client) GetServerVersions(name string) ([]v0.ServerResponse, error)

GetServerVersions returns all versions of a server by name (public endpoint - only published)

func (*Client) GetSkillByName

func (c *Client) GetSkillByName(name string) (*models.SkillResponse, error)

GetSkillByName returns a skill by name

func (*Client) GetSkillByNameAndVersion

func (c *Client) GetSkillByNameAndVersion(name, version string) (*models.SkillResponse, error)

GetSkillByNameAndVersion returns a specific version of a skill

func (*Client) GetSkillByNameAndVersionAdmin

func (c *Client) GetSkillByNameAndVersionAdmin(name, version string) (*models.SkillResponse, error)

GetSkillByNameAndVersionAdmin returns a specific version of a skill (admin endpoint - includes unpublished)

func (*Client) GetSkillVersions

func (c *Client) GetSkillVersions(name string) ([]*models.SkillResponse, error)

GetSkillVersions returns all versions of a skill by name (admin endpoint - includes unpublished)

func (*Client) GetSkills

func (c *Client) GetSkills() ([]*models.SkillResponse, error)

GetSkills returns all skills from connected registries

func (*Client) GetVersion

func (c *Client) GetVersion() (*internalv0.VersionBody, error)

func (*Client) Ping

func (c *Client) Ping() error

Ping checks connectivity to the API

func (*Client) PublishAgent

func (c *Client) PublishAgent(agent *models.AgentJSON) (*models.AgentResponse, error)

PublishAgent creates an agent entry and marks it as published (published=true)

func (*Client) PublishAgentStatus

func (c *Client) PublishAgentStatus(name, version string) error

PublishAgentStatus marks an existing agent as published (sets published=true)

func (*Client) PublishMCPServer

func (c *Client) PublishMCPServer(server *v0.ServerJSON) (*v0.ServerResponse, error)

PublishMCPServer creates an MCP server entry and marks it as published (published=true)

func (*Client) PublishMCPServerStatus

func (c *Client) PublishMCPServerStatus(name, version string) error

PublishMCPServerStatus marks an existing MCP server as published (sets published=true)

func (*Client) PublishSkill

func (c *Client) PublishSkill(skill *models.SkillJSON) (*models.SkillResponse, error)

PublishSkill creates a skill entry and marks it as published (published=true)

func (*Client) PublishSkillStatus

func (c *Client) PublishSkillStatus(name, version string) error

PublishSkillStatus marks an existing skill as published (sets published=true)

func (*Client) PushAgent

func (c *Client) PushAgent(agent *models.AgentJSON) (*models.AgentResponse, error)

PushAgent creates an agent entry in the registry without publishing (published=false)

func (*Client) PushMCPServer

func (c *Client) PushMCPServer(server *v0.ServerJSON) (*v0.ServerResponse, error)

PushMCPServer creates an MCP server entry in the registry without publishing (published=false)

func (*Client) PushSkill

func (c *Client) PushSkill(skill *models.SkillJSON) (*models.SkillResponse, error)

PushSkill creates a skill entry in the registry without publishing (published=false)

func (*Client) RemoveServer

func (c *Client) RemoveServer(name string, version string) error

RemoveServer removes a deployment

func (*Client) UnpublishAgentStatus

func (c *Client) UnpublishAgentStatus(name, version string) error

UnpublishAgentStatus marks an existing agent as unpublished (sets published=false)

func (*Client) UnpublishMCPServer

func (c *Client) UnpublishMCPServer(name, version string) error

UnpublishMCPServer unpublishes an MCP server from the registry

func (*Client) UnpublishSkill

func (c *Client) UnpublishSkill(name, version string) error

UnpublishSkill unpublishes a skill from the registry

func (*Client) UpdateDeploymentConfig

func (c *Client) UpdateDeploymentConfig(name string, config map[string]string) (*DeploymentResponse, error)

UpdateDeploymentConfig updates deployment configuration

type DeploymentResponse

type DeploymentResponse struct {
	ServerName   string            `json:"serverName"`
	Version      string            `json:"version"`
	DeployedAt   string            `json:"deployedAt"`
	UpdatedAt    string            `json:"updatedAt"`
	Status       string            `json:"status"`
	Config       map[string]string `json:"config"`
	PreferRemote bool              `json:"preferRemote"`
	ResourceType string            `json:"resourceType"`
	Runtime      string            `json:"runtime"`
}

DeploymentResponse represents a deployment returned by the API

type DeploymentsListResponse

type DeploymentsListResponse struct {
	Deployments []DeploymentResponse `json:"deployments"`
}

DeploymentsListResponse represents the list of deployments

Jump to

Keyboard shortcuts

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