Skip to content

Commit c01145e

Browse files
committed
refactor: remove AI-related code and tests from core package
1 parent 8c135c2 commit c01145e

8 files changed

Lines changed: 1 addition & 1093 deletions

File tree

packages/foundation/core/src/ai/index.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

packages/foundation/core/src/ai/registry.ts

Lines changed: 0 additions & 81 deletions
This file was deleted.

packages/foundation/core/src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ export * from './plugin';
5656
// ── Utilities ──
5757
export * from './util';
5858

59-
// ── AI runtime (kept in core — separate AI project) ──
60-
export * from './ai';
61-
6259
// ── Re-export from @objectql/plugin-query (backward compatibility) ──
6360
// Import from '@objectql/plugin-query' directly for new code.
6461

packages/foundation/core/src/plugin.ts

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ import type { Logger } from '@objectql/types';
1212
import { ValidatorPlugin, ValidatorPluginConfig } from '@objectql/plugin-validator';
1313
import { FormulaPlugin, FormulaPluginConfig } from '@objectql/plugin-formula';
1414
import { QueryPlugin } from '@objectql/plugin-query';
15-
import { ObjectStackProtocolImplementation } from './protocol';
1615
import type { Driver } from '@objectql/types';
17-
import { createDefaultAiRegistry } from './ai';
1816
import { 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

Comments
 (0)