server

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package server provides an embedded HTTP server for the ask web UI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenBrowser

func OpenBrowser(url string) error

OpenBrowser opens the default browser to the server URL

Types

type ConfigInfo

type ConfigInfo struct {
	Version     string              `json:"version"`
	SkillsDir   string              `json:"skills_dir"`
	Agents      []string            `json:"agents"`
	ToolTargets []config.ToolTarget `json:"tool_targets"`
	GlobalDir   string              `json:"global_dir"`
	ProjectRoot string              `json:"project_root"`
	Initialized bool                `json:"initialized"`
}

ConfigInfo represents configuration for API responses

type InstallRequest

type InstallRequest struct {
	Name  string `json:"name"`
	Agent string `json:"agent,omitempty"`
}

InstallRequest represents an install request

type RepoInfo

type RepoInfo struct {
	Name  string `json:"name"`
	Type  string `json:"type"`
	URL   string `json:"url"`
	Stars int    `json:"stars,omitempty"`
}

RepoInfo represents a repository for API responses

type SearchResult

type SearchResult struct {
	Name        string `json:"name"`
	FullName    string `json:"full_name"`
	Description string `json:"description"`
	Stars       int    `json:"stars"`
	URL         string `json:"url"`
	Source      string `json:"source"`
}

SearchResult represents a search result

type Server

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

Server represents the HTTP server

func New

func New(port int) *Server

New creates a new Server instance

func (*Server) Start

func (s *Server) Start() error

Start starts the HTTP server

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop gracefully stops the server

type SkillInfo

type SkillInfo struct {
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	URL         string   `json:"url,omitempty"`
	Version     string   `json:"version,omitempty"`
	Path        string   `json:"path,omitempty"`
	Agents      []string `json:"agents,omitempty"`
	Repo        string   `json:"repo,omitempty"`
	IconURL     string   `json:"icon_url,omitempty"`
}

SkillInfo represents a skill for API responses

type StatsInfo

type StatsInfo struct {
	InstalledSkills int `json:"installed_skills"`
	ConfiguredRepos int `json:"configured_repos"`
	SyncedRepos     int `json:"synced_repos"`
}

StatsInfo represents dashboard statistics

Directories

Path Synopsis
Package web provides the static web assets for the application.
Package web provides the static web assets for the application.

Jump to

Keyboard shortcuts

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