server

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 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 FileNode added in v1.5.1

type FileNode struct {
	Name     string      `json:"name"`
	Path     string      `json:"path"` // Relative path from root
	Type     string      `json:"type"` // "file" or "dir"
	Size     int64       `json:"size,omitempty"`
	Children []*FileNode `json:"children,omitempty"`
}

FileNode represents a file or directory in the file tree

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"`
}

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"`
	RepoName    string   `json:"repo,omitempty"`
	Agents      []string `json:"agents,omitempty"`
}

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, version string) *Server

New creates a new Server instance

func (*Server) Handler added in v1.4.0

func (s *Server) Handler() http.Handler

Handler returns the HTTP handler for the server (exported for Wails integration)

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