@@ -12,9 +12,7 @@ import type { Logger } from '@objectql/types';
1212import { ValidatorPlugin , ValidatorPluginConfig } from '@objectql/plugin-validator' ;
1313import { FormulaPlugin , FormulaPluginConfig } from '@objectql/plugin-formula' ;
1414import { QueryPlugin } from '@objectql/plugin-query' ;
15- import { ObjectStackProtocolImplementation } from './protocol' ;
1615import type { Driver } from '@objectql/types' ;
17- import { createDefaultAiRegistry } from './ai' ;
1816import { SchemaRegistry } from '@objectstack/objectql' ;
1917
2018/**
@@ -51,12 +49,6 @@ export interface ObjectQLPluginConfig {
5149 */
5250 formulaConfig ?: FormulaPluginConfig ;
5351
54- /**
55- * Enable AI integration
56- * @default true
57- */
58- enableAI ?: boolean ;
59-
6052 /**
6153 * Enable query service and analyzer
6254 * @default true
@@ -90,7 +82,6 @@ export class ObjectQLPlugin implements RuntimePlugin {
9082 enableRepository : true ,
9183 enableValidator : true ,
9284 enableFormulas : true ,
93- enableAI : true ,
9485 enableQueryService : true ,
9586 ...config
9687 } ;
@@ -150,10 +141,6 @@ export class ObjectQLPlugin implements RuntimePlugin {
150141 await formulaPlugin . install ?.( ctx ) ;
151142 }
152143
153- if ( this . config . enableAI !== false ) {
154- await this . registerAI ( kernel ) ;
155- }
156-
157144 // Register system service aliases
158145 if ( typeof ( ctx as any ) . registerService === 'function' ) {
159146 const registerService = ( ctx as any ) . registerService . bind ( ctx ) ;
@@ -266,17 +253,6 @@ export class ObjectQLPlugin implements RuntimePlugin {
266253 this . logger . info ( 'Repository pattern registered' ) ;
267254 }
268255
269- /**
270- * Register AI integration
271- * @private
272- */
273- private async registerAI ( kernel : any ) : Promise < void > {
274- if ( ! ( kernel as any ) . ai ) {
275- ( kernel as any ) . ai = createDefaultAiRegistry ( ) ;
276- }
277- this . logger . debug ( 'AI integration registered' ) ;
278- }
279-
280256 // --- Adapter for @objectstack/core compatibility ---
281257 init = async ( pluginCtx : any ) : Promise < void > => {
282258 // The @objectstack /core kernel passes a PluginContext (with registerService, getKernel, etc.)
@@ -325,13 +301,8 @@ export class ObjectQLPlugin implements RuntimePlugin {
325301 : undefined ,
326302 } ;
327303
328- // Register Protocol Service
304+ // Register 'objectql' service for AppPlugin compatibility
329305 if ( typeof pluginCtx . registerService === 'function' ) {
330- this . logger . info ( 'Registering protocol service...' ) ;
331- const protocolShim = new ObjectStackProtocolImplementation ( actualKernel ) ;
332- pluginCtx . registerService ( 'protocol' , protocolShim ) ;
333-
334- // Register 'objectql' service for AppPlugin compatibility
335306 pluginCtx . registerService ( 'objectql' , this ) ;
336307 this . logger . debug ( 'Registered objectql service' ) ;
337308 }
0 commit comments