Skip to content

Plugin configuration reference

Reference for the config: block in plugin.yaml: descriptor fields, value types, and the error codes that configuration problems produce. For how to declare, merge, and read configuration in your plugin, see Plugin Runtime Configuration.

Each key under config: maps to a descriptor with these fields:

FieldRequiredDescription
typeYesOne of string, int, bool, duration
defaultNoString representation of the default value, parsed according to type (e.g., "30s" for a duration)
requiredNoIf true, the key must be supplied by either a default or a server override. Defaults to false.
descriptionNoHuman-readable explanation shown in plugin info output.
TypeFormatExample
stringAny UTF-8 text"my-value"
intDecimal integer"42"
bool"true" or "false""true"
durationGo duration string (h, m, s, ms)"30s", "168h"

The host treats configuration as opaque: it validates that default values are parseable to their declared type, but it does not interpret what any key means. Semantics are entirely up to your plugin.

A configuration problem stops the plugin from loading and is logged server-side with a descriptive message.

Error codeCause
PLUGIN_CONFIG_SCHEMA_INVALIDAn unknown type, or a default value that cannot be parsed to its declared type.
PLUGIN_CONFIG_UNKNOWN_KEYOperator supplied a key that is not in the manifest schema.
PLUGIN_CONFIG_TYPE_INVALIDThe effective value (after merge) cannot be parsed to its type.
PLUGIN_CONFIG_MISSING_REQUIREDA required: true key has no default and no operator override.

The host injects a holomush.config table with typed accessor functions. Each plain accessor returns the value or nil if the key is absent; each require_* variant raises a Lua error if the key is absent.

FunctionReturns
holomush.config.string(key)string or nil
holomush.config.int(key)number or nil
holomush.config.bool(key)boolean or nil
holomush.config.duration(key)number of seconds (float) or nil
holomush.config.require_int(key)number or raises a Lua error
holomush.config.require_duration(key)number of seconds or raises
holomush.config.require_bool(key)boolean or raises a Lua error
holomush.config.require_string(key)string or raises a Lua error

A present-but-unparseable value raises immediately (fail-loud).