Understand any codebase instantly. System intelligence for codebases, built for humans and AI.
TypeScript aiai-memoryclaude-codeclicode-analysiscode-mappingcode-memorycodebase-understandingcodexdeveloper-toolsllmopenclawpersistent-memoryprogram-analysissoftware-architecturesystem-intelligencesystem-mapping
feat: wire BulkIngestionService into HTTP routes and Main
riley0227ab452b22920f
diff --git a/memory-layer/src/main/scala/ix/memory/Main.scala b/memory-layer/src/main/scala/ix/memory/Main.scalaindex 3f915d2e..29ef36fd 100644--- a/memory-layer/src/main/scala/ix/memory/Main.scala+++ b/memory-layer/src/main/scala/ix/memory/Main.scala@@ -26,12 +26,14 @@ object Main extends IOApp.Simple {_ <- Resource.eval(client.ensureSchema())// 2. Core APIs- writeApi = new ArangoGraphWriteApi(client)- queryApi = new ArangoGraphQueryApi(client)+ writeApi = new ArangoGraphWriteApi(client)+ queryApi = new ArangoGraphQueryApi(client)+ bulkWriteApi = new BulkWriteApi(client)// 3. Services- parserRouter = new ParserRouter()- ingestionService = new IngestionService(parserRouter, writeApi, queryApi)+ parserRouter = new ParserRouter()+ ingestionService = new IngestionService(parserRouter, writeApi, queryApi)+ bulkIngestionService = new BulkIngestionService(parserRouter, bulkWriteApi, queryApi)seeder = new GraphSeeder(queryApi)expander = new GraphExpander(queryApi)claimCollector = new ClaimCollector(queryApi)@@ -42,7 +44,7 @@ object Main extends IOApp.Simple {conflictService = new ConflictService(client, queryApi, writeApi)// 4. HTTP routes- routes = Routes.all(contextService, ingestionService, queryApi, writeApi, conflictService, client)+ routes = Routes.all(contextService, ingestionService, bulkIngestionService, queryApi, writeApi, conflictService, client)// 5. Serverserver <- EmberServerBuilderdiff --git a/memory-layer/src/main/scala/ix/memory/api/IngestionRoutes.scala b/memory-layer/src/main/scala/ix/memory/api/IngestionRoutes.scalaindex 13abea0a..763bbbfc 100644--- a/memory-layer/src/main/scala/ix/memory/api/IngestionRoutes.scala+++ b/memory-layer/src/main/scala/ix/memory/api/IngestionRoutes.scala@@ -9,7 +9,7 @@ import org.http4s.HttpRoutesimport org.http4s.circe.CirceEntityCodec._import org.http4s.dsl.io._-import ix.memory.ingestion.IngestionService+import ix.memory.ingestion.{BulkIngestionService, IngestionService}case class IngestRequest(path: String, language: Option[String], recursive: Option[Boolean])@@ -25,7 +25,7 @@ object IngestResponse {implicit val decoder: Decoder[IngestResponse] = deriveDecoder[IngestResponse]}-class IngestionRoutes(ingestionService: IngestionService) {+class IngestionRoutes(ingestionService: IngestionService, bulkIngestionService: BulkIngestionService) {val routes: HttpRoutes[IO] = HttpRoutes.of[IO] {case req @ POST -> Root / "v1" / "ingest" =>@@ -35,7 +35,7 @@ class IngestionRoutes(ingestionService: IngestionService) {new IllegalArgumentException("Path traversal not allowed"))path = Paths.get(body.path)- result <- ingestionService.ingestPath(path, body.language, body.recursive.getOrElse(false))+ result <- bulkIngestionService.ingestPath(path, body.language, body.recursive.getOrElse(false))resp <- Ok(IngestResponse(filesProcessed = result.filesProcessed,patchesApplied = result.patchesApplied,diff --git a/memory-layer/src/main/scala/ix/memory/api/Routes.scala b/memory-layer/src/main/scala/ix/memory/api/Routes.scalaindex 3113d274..e4283e31 100644--- a/memory-layer/src/main/scala/ix/memory/api/Routes.scala+++ b/memory-layer/src/main/scala/ix/memory/api/Routes.scala@@ -11,14 +11,15 @@ import org.http4s.dsl.io._import ix.memory.conflict.ConflictServiceimport ix.memory.context.ContextServiceimport ix.memory.db.{ArangoClient, GraphQueryApi, GraphWriteApi}-import ix.memory.ingestion.IngestionService+import ix.memory.ingestion.{BulkIngestionService, IngestionService}object Routes {def all(- contextService: ContextService,- ingestionService: IngestionService,- queryApi: GraphQueryApi,+ contextService: ContextService,+ ingestionService: IngestionService,+ bulkIngestionService: BulkIngestionService,+ queryApi: GraphQueryApi,writeApi: GraphWriteApi,conflictService: ConflictService,client: ArangoClient@@ -30,7 +31,7 @@ object Routes {}val contextRoutes = new ContextRoutes(contextService).routes- val ingestionRoutes = new IngestionRoutes(ingestionService).routes+ val ingestionRoutes = new IngestionRoutes(ingestionService, bulkIngestionService).routesval entityRoutes = new EntityRoutes(queryApi).routesval diffRoutes = new DiffRoutes(queryApi).routesval conflictRoutes = new ConflictRoutes(conflictService).routes