donobu
Version:
Create browser automations with an LLM agent and replay them as Playwright scripts.
29 lines • 1.79 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.setupDonobuStack = setupDonobuStack;
const AgentsPersistenceSqlite_1 = require("../persistence/AgentsPersistenceSqlite");
const DonobuSqliteDb_1 = require("../persistence/DonobuSqliteDb");
const FlowsPersistenceFactoryImpl_1 = require("../persistence/FlowsPersistenceFactoryImpl");
const GptConfigsPersistenceSqlite_1 = require("../persistence/GptConfigsPersistenceSqlite");
const AgentsManager_1 = require("./AgentsManager");
const DonobuFlowsManager_1 = require("./DonobuFlowsManager");
const GptConfigsManager_1 = require("./GptConfigsManager");
async function setupDonobuStack(donobuDeploymentEnvironment, requestContextHolder) {
const sqliteDb = (0, DonobuSqliteDb_1.getDonobuSqliteDatabase)();
const gptConfigsPersistence = await GptConfigsPersistenceSqlite_1.GptConfigsPersistenceSqlite.create(sqliteDb);
const gptConfigsManager = await GptConfigsManager_1.GptConfigsManager.create(gptConfigsPersistence);
const agentsPersistence = await AgentsPersistenceSqlite_1.AgentsPersistenceSqlite.create(sqliteDb);
const agentsManager = await AgentsManager_1.AgentsManager.create(agentsPersistence, gptConfigsManager);
const flowsPersistenceFactory = await FlowsPersistenceFactoryImpl_1.FlowsPersistenceFactoryImpl.fromEnvironment(donobuDeploymentEnvironment, requestContextHolder);
const flowsManager = new DonobuFlowsManager_1.DonobuFlowsManager(donobuDeploymentEnvironment, gptConfigsManager, agentsManager, flowsPersistenceFactory);
return {
sqliteDb,
gptConfigsPersistence,
gptConfigsManager,
agentsPersistence,
agentsManager,
flowsPersistenceFactory,
flowsManager,
};
}
//# sourceMappingURL=DonobuStack.js.map