mirror of
https://github.com/mudler/LocalAI.git
synced 2026-09-12 22:33:54 -04:00
Distributed mode has not dialled a message broker since the control plane moved onto the workers' own outward tunnels and every fan-out family moved onto PostgreSQL LISTEN/NOTIFY. What was left was the dependency itself, and the code that existed only to feed it. Dropped from go.mod: nats-io/jwt/v2, nats-io/nats.go, nats-io/nkeys, nats-io/nuid and testcontainers-go/modules/nats, along with the fourteen indirect requires that only the NATS testcontainer pulled in. go.sum carries no nats line either, so the removal is not the partial kind where the require goes and the checksum stays. Deleted with them: pkg/natsauth in full, the broker client's remaining options and TLS files, the per-node JWT minting on both the register and the approve path, and the natsauth.Config parameter threaded through the node routes. The credential manager is renamed and stripped rather than deleted, because it still holds the tunnel token that every re-registration rotates. The bus flags stay accepted and ignored, and are now hidden, on every command that had them, so an existing unit file, compose file or Helm values file still starts on the day of the upgrade. What is not kept is the validation that REQUIRED one: a distributed frontend started with no bus URL is no longer fatal. The TLS paths lose type:"existingfile" deliberately, so a certificate deleted along with the broker cannot fail a startup. One operator-visible behaviour change: --nats-require-auth no longer makes an agent worker wait through admin approval. Ask for that wait with --distributed-require-auth, which already implied it. It is documented in the migration section and pinned from both sides. A deployment now needs PostgreSQL and the frontends' own HTTP listener, and nothing else. coverage-baseline.txt moves from 54.2 to 62.0. Assisted-by: Claude Opus 5 [claude-code] Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
28 lines
1.9 KiB
Go
28 lines
1.9 KiB
Go
package cli
|
|
|
|
import (
|
|
cliContext "github.com/mudler/LocalAI/core/cli/context"
|
|
"github.com/mudler/LocalAI/core/cli/worker"
|
|
)
|
|
|
|
var CLI struct {
|
|
cliContext.Context `embed:""`
|
|
|
|
Run RunCMD `cmd:"" help:"Run LocalAI, this the default command if no other command is specified. Run 'local-ai run --help' for more information" default:"withargs"`
|
|
Chat ChatCMD `cmd:"" help:"Run the built-in terminal agent against a LocalAI server"`
|
|
Federated FederatedCLI `cmd:"" help:"Run LocalAI in federated mode"`
|
|
Models ModelsCMD `cmd:"" help:"Manage LocalAI models and definitions"`
|
|
Backends BackendsCMD `cmd:"" help:"Manage LocalAI backends and definitions"`
|
|
TTS TTSCMD `cmd:"" help:"Convert text to speech"`
|
|
SoundGeneration SoundGenerationCMD `cmd:"" help:"Generates audio files from text or audio"`
|
|
Transcript TranscriptCMD `cmd:"" help:"Convert audio to text"`
|
|
P2PWorker worker.Worker `cmd:"" name:"p2p-worker" help:"Run workers to distribute workload via p2p (llama.cpp-only)"`
|
|
Worker WorkerCMD `cmd:"" help:"Start a worker for distributed mode (generic, backend-agnostic)"`
|
|
AgentWorker AgentWorkerCMD `cmd:"" name:"agent-worker" help:"Start an agent worker for distributed mode (executes agent chats over the tunnel it dials out to a frontend)"`
|
|
Util UtilCMD `cmd:"" help:"Utility commands"`
|
|
Agent AgentCMD `cmd:"" help:"Run agents standalone without the full LocalAI server"`
|
|
MCPServer MCPServerCMD `cmd:"" name:"mcp-server" help:"Run the LocalAI admin tool surface as a stdio MCP server (controls a remote LocalAI instance over HTTP)"`
|
|
Explorer ExplorerCMD `cmd:"" help:"Run p2p explorer"`
|
|
Completion CompletionCMD `cmd:"" help:"Generate shell completion scripts for bash, zsh, or fish"`
|
|
}
|