QVAC Logo

definePlugin( )

Helper function to define a plugin with full type inference. This is an identity function that provides type checking.

function definePlugin(plugin: T): T

Parameters

NameTypeRequired?Description
pluginTNo description

Returns

T
FieldTypeDescription
addonPackagestring
createModel(params: CreateModelParams) => PluginModelResult
displayNamestring
handlersRecord
loadConfigSchemaZodType
loggingPluginLogging
modelTypestring
resolveConfig(modelConfig: TConfig, ctx: ResolveContext) => Promise<ResolveResult<TConfig, TArtifactKeys>>Optional hook to resolve model sources in modelConfig to local paths.
Called before createModel if the plugin needs to download/resolve artifacts.
Returns transformed config and optional artifact paths.
skipPrimaryModelPathValidationbooleanWhen true, skips file-existence validation for modelPath. Use for plugins that derive paths from config.

On this page