Documentation
¶
Overview ¶
Package console provides the extension interface and bootstrap entry point for the OpenClaw Console server.
External consumers (e.g. a private wrapper repo) import this package to register Extension implementations and start the server via Bootstrap.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bootstrap ¶
Bootstrap initialises all core services, starts extensions, and runs the HTTP server. It blocks until the server exits and returns any error.
The caller is responsible for configuring the global logger before calling Bootstrap (e.g. setting zerolog's log.Logger).
Types ¶
type Config ¶
type Config struct {
Addr string
AuthToken string
ModelCatalogProviders []ModelCatalogProvider
}
Config holds configuration for the console server.
type Extension ¶
type Extension interface {
// ID returns a unique identifier for this extension (e.g. "updater").
ID() string
// DisplayName returns a human-readable name for sidebar display.
DisplayName() string
// Icon returns a Lucide icon name (e.g. "refresh-cw").
Icon() string
// BasePath returns the frontend route path (e.g. "/system-updates").
BasePath() string
// Handler returns an http.Handler whose routes are mounted
// at /api/v1/extensions/{ID}/.
Handler() http.Handler
// Start launches background tasks. The provided context is cancelled
// on server shutdown. Must be non-blocking.
Start(ctx context.Context) error
}
Extension defines a pluggable module that adds API routes, background tasks, and a navigation entry to the console UI.
type ModelCatalogEntry ¶ added in v0.5.0
type ModelCatalogEntry = openclaw.ModelCatalogEntry
ModelCatalogEntry is a type alias for the internal ModelCatalogEntry type.
type ModelCatalogProvider ¶ added in v0.5.0
type ModelCatalogProvider = openclaw.ModelCatalogProvider
ModelCatalogProvider is a type alias for the internal ModelCatalogProvider interface, allowing external consumers to implement it.