/** * ObjectQL Plugin * Copyright (c) 2026-present ObjectStack Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import type { RuntimePlugin, RuntimeContext } from '@objectql/types'; import { ValidatorPluginConfig } from '@objectql/plugin-validator'; import { FormulaPluginConfig } from '@objectql/plugin-formula'; import type { Driver } from '@objectql/types'; /** * Configuration for the ObjectQL Plugin */ export interface ObjectQLPluginConfig { /** * Enable repository pattern for data access * @default true */ enableRepository?: boolean; /** * Enable validation engine * @default true */ enableValidator?: boolean; /** * Validator plugin configuration * Only used if enableValidator is not false */ validatorConfig?: ValidatorPluginConfig; /** * Enable formula engine * @default true */ enableFormulas?: boolean; /** * Formula plugin configuration * Only used if enableFormulas is not false */ formulaConfig?: FormulaPluginConfig; /** * Enable query service and analyzer * @default true */ enableQueryService?: boolean; /** * Datasources for query service * Required if enableQueryService is true */ datasources?: Record; } /** * ObjectQL Plugin * * Thin orchestrator that composes ObjectQL's extension plugins * (QueryPlugin, ValidatorPlugin, FormulaPlugin, AI) on top of the microkernel. * * Delegates query execution to @objectql/plugin-query and provides * repository-pattern CRUD bridging to the kernel. */ export declare class ObjectQLPlugin implements RuntimePlugin { private config; name: string; version: string; private logger; constructor(config?: ObjectQLPluginConfig, _ql?: any); /** * Install the plugin into the kernel * This is called during kernel initialization */ install(ctx: RuntimeContext): Promise; /** * Called when the kernel starts * This is the initialization phase */ onStart(_ctx: RuntimeContext): Promise; /** * Register the Repository pattern * @private */ private registerRepository; init: (pluginCtx: any) => Promise; start: (pluginCtx: any) => Promise; }