"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __exportStar = (this && this.__exportStar) || function(m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.services = exports.Clients = exports.MCP = void 0;
const clients_1 = require("../clients");
const AgentService_1 = require("./AgentService");
const EventService_1 = require("./EventService");
const flags_1 = require("./flags");
const EmbeddingsService_1 = require("./EmbeddingsService");
const KnowhowClient_1 = require("./KnowhowClient");
const Mcp_1 = require("./Mcp");
const S3_1 = require("./S3");
const Tools_1 = require("./Tools");
const plugins_1 = require("../plugins/plugins");
const DockerService_1 = require("./DockerService");
const MediaProcessorService_1 = require("./MediaProcessorService");
__exportStar(require("./AgentService"), exports);
__exportStar(require("./EventService"), exports);
__exportStar(require("./flags"), exports);
__exportStar(require("./EmbeddingsService"), exports);
__exportStar(require("./S3"), exports);
__exportStar(require("./Tools"), exports);
__exportStar(require("./LazyToolsService"), exports);
exports.MCP = __importStar(require("./Mcp"));
__exportStar(require("./EmbeddingService"), exports);
__exportStar(require("./DockerService"), exports);
__exportStar(require("./MediaProcessorService"), exports);
__exportStar(require("./AgentSyncKnowhowWeb"), exports);
__exportStar(require("./AgentSyncFs"), exports);
__exportStar(require("./SessionManager"), exports);
__exportStar(require("./TaskRegistry"), exports);
__exportStar(require("./SyncedAgentWatcher"), exports);
__exportStar(require("./SyncerService"), exports);
__exportStar(require("./watchers"), exports);
var clients_2 = require("../clients");
Object.defineProperty(exports, "Clients", { enumerable: true, get: function () { return clients_2.Clients; } });
let Singletons = {};
const services = () => {
    if (Object.keys(Singletons).length === 0) {
        const Tools = new Tools_1.ToolsService();
        const Events = new EventService_1.EventService();
        const Agents = new AgentService_1.AgentService(Tools, Events);
        const Plugins = new plugins_1.PluginService({
            Agents,
            Events,
            Tools,
            Clients: clients_1.Clients,
        });
        Singletons = {
            Agents,
            AwsS3: new S3_1.S3Service(),
            Clients: clients_1.Clients,
            Docker: new DockerService_1.DockerService(),
            Events,
            Embeddings: new EmbeddingsService_1.EmbeddingsService(),
            Flags: new flags_1.FlagsService(),
            Mcp: new Mcp_1.McpService(),
            MediaProcessor: new MediaProcessorService_1.MediaProcessorService(clients_1.Clients),
            Plugins,
            Tools,
            knowhowApiClient: new KnowhowClient_1.KnowhowSimpleClient(),
        };
        Singletons.Tools.setContext({
            Agents,
            Events,
            Plugins,
            Clients: clients_1.Clients,
        });
    }
    return Singletons;
};
exports.services = services;
//# sourceMappingURL=index.js.map