api

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package api provides HTTP/WebSocket API for AUTO

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentResponse

type AgentResponse struct {
	ID           string    `json:"id"`
	Name         string    `json:"name"`
	Type         string    `json:"type"`
	Status       string    `json:"status"`
	Directory    string    `json:"directory"`
	ProjectID    string    `json:"project_id"`
	CurrentTask  string    `json:"current_task"`
	StartTime    time.Time `json:"start_time"`
	LastActivity time.Time `json:"last_activity"`
	TokensIn     int64     `json:"tokens_in"`
	TokensOut    int64     `json:"tokens_out"`
}

AgentResponse represents an agent in API responses

type Response

type Response struct {
	Success bool        `json:"success"`
	Data    interface{} `json:"data,omitempty"`
	Error   string      `json:"error,omitempty"`
}

Response is the standard API response format

type Server

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

Server provides the HTTP API

func NewServer

func NewServer(manager *session.Manager, addr string) *Server

NewServer creates a new API server

func (*Server) Addr

func (s *Server) Addr() string

Addr returns the server address

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

Jump to

Keyboard shortcuts

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