server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package server serves mutti over HTTP on the loopback interface: a web UI, a JSON API with the envelopes of --json, server-sent events, and the MCP server for agents that speak HTTP.

Index

Constants

View Source
const SchemaVersion = 1

SchemaVersion of the API's JSON, the same as the command line's.

Variables

This section is empty.

Functions

This section is empty.

Types

type Done

type Done struct {
	Instance string `json:"instance"`
	URL      string `json:"url,omitempty"`
	Output   string `json:"output"`
}

Done is the answer of the lifecycle actions.

type Logs

type Logs struct {
	Output string `json:"output"`
}

Logs is the answer of /api/logs.

type Server

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

Server is mutti's HTTP server for one machine.

func New

func New(a *app.App, dir, version string) *Server

New returns the server. dir is the directory mutti serve was started in.

func (*Server) Handler

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

Handler routes the UI, the API and MCP. Every request must name a loopback host, so a web page that rebinds its own domain to 127.0.0.1 gets nothing; requests that change something must come from this origin.

Jump to

Keyboard shortcuts

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