server

package
v0.99.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: GPL-3.0 Imports: 119 Imported by: 0

Documentation

Overview

Package server provides the HTTP API server (Fiber v3) and route handlers.

Index

Constants

View Source
const DataEventTopic = "pipeline:data_event"

Variables

View Source
var Modules = fx.Options(
	flog.FxModule,
	metrics.Module(),
	modules.Modules,
	NotifyModules,
	MediaModules,
	OAuthModules,
	ReexecModules,
	fx.Provide(
		config.NewConfig,
		cache.NewCache,
		rdb.NewClient,
		cache.NewRedisStore,
		event.NewRouter,
		event.NewSubscriber,
		event.NewPublisher,
		slack.NewDriver,
		trace.NewTracerProvider,
		newController,
		newDatabaseAdapter,
		newHTTPServer,
		newAuditor,
	),
	fx.Invoke(
		setServerCacheStore,
		setRouteAuditor,
		WireAccessTokenStore,
		WireModuleDataStore,
		WireMessageDestinations,
		setAgentMetricsCollector,
		handleRoutes,
		handleEvents,
		initPipeline,
		initWorkflow,
		initFunctions,
		initAgentAbility,
		initClipAbility,
		initGatewayAbility,
		initChatAgentScheduler,
		handleModules,
		handlePlatform,
		RunServer,
		profiling.NewProfiler,
		initPageDataCleanup,
	),
)

OAuthModules registers all OAuth provider factories via fx.

View Source
var ReexecModules = fx.Options(
	fx.Invoke(
		shell.Register,
	),
)

ReexecModules registers all reexec handlers via fx.

Functions

func ChatAgentService added in v0.98.2

func ChatAgentService() *chatagent.Service

ChatAgentService returns the process-wide chatagent Service, creating and binding it once on first use.

func NewPipelineStepCallback added in v0.92.0

func NewPipelineStepCallback(client *redis.Client) pipeline.StepCallback

NewPipelineStepCallback creates a callback backed by the Redis client. Returns nil if rdb is nil.

func RegisterAgentLLMRoutes added in v0.99.0

func RegisterAgentLLMRoutes(a *fiber.App)

RegisterAgentLLMRoutes mounts the OpenAI-compatible LLM proxy for flowbot-agent.

func RegisterChatAgentRoutes added in v0.93.0

func RegisterChatAgentRoutes(a *fiber.App, svc *chatagent.Service)

RegisterChatAgentRoutes wires Chat Agent REST endpoints for HTTP clients.

func RegisterChatAgentSignedMediaRoute added in v0.98.2

func RegisterChatAgentSignedMediaRoute(a *fiber.App)

RegisterChatAgentSignedMediaRoute serves HMAC-signed FS media for LLM providers.

func RegisterGatewayRoutes added in v0.99.0

func RegisterGatewayRoutes(a *fiber.App)

RegisterGatewayRoutes mounts local-CLI gateway worker APIs (not notification gateway).

func RunHomelabScan added in v0.92.0

func RunHomelabScan(cfg config.Homelab) error

RunHomelabScan executes a full homelab scan + probe + registry update cycle. It walks the configured apps directory, discovers compose files, runs the probe engine for endpoint/auth discovery, and replaces the default registry. Exported for use by the homelab web handler to support manual rescan.

func RunServer added in v0.31.1

func RunServer(
	lc fx.Lifecycle,
	app *fiber.App,
	shutdowner fx.Shutdowner,
	_ store.Adapter,
	_ *cache.Cache,
	_ *redis.Client,
	_ message.Publisher,
)

func SetCacheStore added in v0.92.0

func SetCacheStore(s *cache.RedisStore)

SetCacheStore sets the cache store for server functions.

func WireAccessTokenStore added in v0.99.0

func WireAccessTokenStore()

WireAccessTokenStore injects the store-backed access token adapter into route.

func WireFileMetaStore added in v0.99.0

func WireFileMetaStore()

WireFileMetaStore injects the store-backed file metadata adapter into media.

func WireMessageDestinations added in v0.99.0

func WireMessageDestinations()

WireMessageDestinations injects the store-backed message destinations adapter into event.

func WireModuleDataStore added in v0.99.0

func WireModuleDataStore()

WireModuleDataStore injects the store-backed module data adapter into module.

func WireNotifyStores added in v0.99.0

func WireNotifyStores()

WireNotifyStores injects store-backed notify adapters into pkg/notify.

func WireOAuthTokenStore added in v0.99.0

func WireOAuthTokenStore()

WireOAuthTokenStore injects the store-backed OAuth token adapter into providers.

Types

type Controller added in v0.31.1

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

Directories

Path Synopsis
Package chatagent orchestrates the Flowbot chat assistant: session lifecycle, harness pooling, SSE streaming, tool confirmations, permissions, and scheduled tasks.
Package chatagent orchestrates the Flowbot chat assistant: session lifecycle, harness pooling, SSE streaming, tool confirmations, permissions, and scheduled tasks.
tools/clip
Package clip provides agent tools for creating and reading shareable markdown clips.
Package clip provides agent tools for creating and reading shareable markdown clips.
tools/gateway
Package gateway provides the chatagent tool that delegates to CapGateway (local CLI workers).
Package gateway provides the chatagent tool that delegates to CapGateway (local CLI workers).
tools/notify
Package notify provides the chatagent tool for Gateway notification pushes.
Package notify provides the chatagent tool for Gateway notification pushes.

Jump to

Keyboard shortcuts

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