Overview
PluginContext is the boot-time context. It’s the input to the boot-time hooks — getTools, getSubAgents, getMiddlewares, and getNestModules. (The request-time hooks getRequestTools / getRequestSubAgents receive the richer RuntimeContext instead.)
RuntimeContext instead — available in request-time hooks (getRequestTools, getRequestSubAgents) and in every tool handler / sub-agent handler / middleware hook.
Fields
config
config
- Type:
TConfig(defaults toMergedConfig = Record<string, unknown>)
configSchema. Already validated by the time you receive it — parse it through your plugin’s own schema for typed access.identity
identity
- Type:
OracleIdentity
name, org, description, and prompt come from the config argument to createOracleApp. entityDid is sourced from the ORACLE_ENTITY_DID env var. Read-only.availablePlugins
availablePlugins
- Type:
ReadonlySet<string>
PluginContext and RuntimeContext instances during the lifetime of the app.logger
logger
- Type:
Logger
Logger interface:debug, verbose, and child are optional. The runtime ships NestJS’s Logger as the default; you can override via createOracleApp({ logger }).Lifetime
Boot-time hooks (getTools, getSubAgents, getMiddlewares) fire once at boot, against a boot-warm PluginContext, and their output is cached. The per-request agent build reuses that cache and only re-runs the request-time hooks (getRequestTools, getRequestSubAgents) — so anything that varies per request must come from RuntimeContext, not PluginContext. PluginContext only ever carries boot-fixed data (config, identity, availablePlugins, logger).