Documentation
¶
Overview ¶
Package console exposes a small, generic, self-contained web UI for any Nexss binary. It lists the registered actions and lets you invoke one with a JSON payload. It is intentionally minimal — a debugging surface, not an application console.
Applications that want richer UIs (chat, sessions, docker timeline) should build them as separate actions and mount them alongside. The console package does not know about sessions, models, or business concepts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Actions ¶
Actions returns the console surface for the given registry.
Two actions are produced:
console.index GET <BasePath>/ — serves the HTML console.actions GET <BasePath>/actions — lists the registry as JSON
When AllowExecute is true, a third action is added:
console.execute POST <BasePath>/execute — invokes a named action
All three are Public-scoped so they can be reached through the normal HTTP transport. This is intentional: the console is a debugging surface, and the operator is expected to gate it at the reverse proxy or bind it to a private port, not hide it behind an auth scheme the framework does not own.
Types ¶
type ActionItem ¶
type ActionItem struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
Scope string `json:"scope,omitempty"`
}
ActionItem is the projection of action.Meta shown in the console. Deliberately narrow: no schema, no hooks, no internal fields.
type Config ¶
type Config struct {
// Title is shown in the console header. Defaults to "Nexss Console".
Title string
// BasePath is the URL prefix. Defaults to "/console". Trailing slash
// is stripped. Must start with "/".
BasePath string
// AllowExecute enables the "execute" panel. When false, the console
// is read-only: it lists actions but cannot invoke them. Defaults to
// false — read-only is the safer choice.
AllowExecute bool
}
Config controls the mounted surface.
type Registry ¶
Registry is the minimal source of actions the console lists. It is satisfied by anything that can enumerate the currently registered actions, including bootstrap.Assembly.
type RegistryFunc ¶
RegistryFunc adapts a function to Registry.
func (RegistryFunc) Actions ¶
func (f RegistryFunc) Actions() []action.AnyAction