Skip to content

config

Plugin configuration types and shared RequestContext keys.

Owns the typed MastraPluginConfig (the plugin’s slice of AppKit config) and MASTRA_CONFIG_SCHEMA, the JSON Schema the manifest publishes for it so scaffolding tools and agents can read the option set.

Precedence per field is explicit plugin config, then the environment variable named on the field, then a built-in default.

Kept in a leaf module so plugin.ts, server.ts, model.ts, and memory.ts can import them without creating a cycle.