diff --git a/infrastructure/research/build.gradle b/infrastructure/research/build.gradle deleted file mode 100644 index fa460a0f..00000000 --- a/infrastructure/research/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -plugins { - id 'java-library' - id 'org.jetbrains.kotlin.jvm' - id 'org.jetbrains.kotlin.plugin.serialization' -} - -ext { - ktor_version = '3.0.3' -} - -dependencies { - implementation project(":core:events") - implementation project(":core:tools") - implementation project(":core:approvals") - implementation 'org.jsoup:jsoup:1.20.1' - implementation "io.ktor:ktor-client-core:$ktor_version" - implementation "io.ktor:ktor-client-cio:$ktor_version" - - testImplementation "io.ktor:ktor-client-mock:$ktor_version" -} - -// Pure deterministic extraction utility; coverage gate is enforced via its own thorough -// unit tests, not the global line-count bound (same stance as :infrastructure:tools). -tasks.named("koverVerify").configure { enabled = false } diff --git a/infrastructure/tools/build.gradle b/infrastructure/tools/build.gradle index 3a3f336f..923bf246 100644 --- a/infrastructure/tools/build.gradle +++ b/infrastructure/tools/build.gradle @@ -4,6 +4,10 @@ plugins { id 'org.jetbrains.kotlin.plugin.serialization' } +ext { + ktor_version = '3.0.3' +} + dependencies { implementation project(":core:tools") implementation project(":core:events") @@ -12,6 +16,13 @@ dependencies { implementation project(":infrastructure:tools:filesystem") implementation project(":core:artifacts") implementation project(":core:artifacts-store") + + // Web research tools (web_search, web_fetch) + deterministic HTML→markdown extraction. + implementation 'org.jsoup:jsoup:1.20.1' + implementation "io.ktor:ktor-client-core:$ktor_version" + implementation "io.ktor:ktor-client-cio:$ktor_version" + + testImplementation "io.ktor:ktor-client-mock:$ktor_version" } tasks.named("koverVerify").configure { enabled = false } diff --git a/infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/extract/ExtractionResult.kt b/infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/extract/ExtractionResult.kt similarity index 95% rename from infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/extract/ExtractionResult.kt rename to infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/extract/ExtractionResult.kt index 0bbe91f4..cbd0b6f5 100644 --- a/infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/extract/ExtractionResult.kt +++ b/infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/extract/ExtractionResult.kt @@ -1,4 +1,4 @@ -package com.correx.infrastructure.research.extract +package com.correx.infrastructure.tools.extract /** * Outcome of extracting a fetched page (research-workflow-spec §5). The cleaned [markdown] is the diff --git a/infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/extract/HtmlMarkdownExtractor.kt b/infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/extract/HtmlMarkdownExtractor.kt similarity index 98% rename from infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/extract/HtmlMarkdownExtractor.kt rename to infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/extract/HtmlMarkdownExtractor.kt index 11b5f540..9a3cc500 100644 --- a/infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/extract/HtmlMarkdownExtractor.kt +++ b/infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/extract/HtmlMarkdownExtractor.kt @@ -1,4 +1,4 @@ -package com.correx.infrastructure.research.extract +package com.correx.infrastructure.tools.extract import org.jsoup.Jsoup diff --git a/infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/extract/MainContentSelector.kt b/infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/extract/MainContentSelector.kt similarity index 98% rename from infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/extract/MainContentSelector.kt rename to infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/extract/MainContentSelector.kt index ee244468..f377ac02 100644 --- a/infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/extract/MainContentSelector.kt +++ b/infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/extract/MainContentSelector.kt @@ -1,4 +1,4 @@ -package com.correx.infrastructure.research.extract +package com.correx.infrastructure.tools.extract import org.jsoup.nodes.Document import org.jsoup.nodes.Element diff --git a/infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/extract/MarkdownRenderer.kt b/infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/extract/MarkdownRenderer.kt similarity index 99% rename from infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/extract/MarkdownRenderer.kt rename to infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/extract/MarkdownRenderer.kt index a302a1cc..a1f50e2c 100644 --- a/infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/extract/MarkdownRenderer.kt +++ b/infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/extract/MarkdownRenderer.kt @@ -1,4 +1,4 @@ -package com.correx.infrastructure.research.extract +package com.correx.infrastructure.tools.extract import org.jsoup.nodes.Element import org.jsoup.nodes.Node diff --git a/infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/web/WebFetchTool.kt b/infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/web/WebFetchTool.kt similarity index 97% rename from infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/web/WebFetchTool.kt rename to infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/web/WebFetchTool.kt index a68a5426..3b990c70 100644 --- a/infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/web/WebFetchTool.kt +++ b/infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/web/WebFetchTool.kt @@ -1,4 +1,4 @@ -package com.correx.infrastructure.research.web +package com.correx.infrastructure.tools.web import com.correx.core.approvals.Tier import com.correx.core.events.events.ToolRequest @@ -9,8 +9,8 @@ import com.correx.core.tools.contract.ToolCapability import com.correx.core.tools.contract.ToolExecutor import com.correx.core.tools.contract.ToolResult import com.correx.core.tools.contract.ValidationResult -import com.correx.infrastructure.research.extract.ExtractionQuality -import com.correx.infrastructure.research.extract.HtmlMarkdownExtractor +import com.correx.infrastructure.tools.extract.ExtractionQuality +import com.correx.infrastructure.tools.extract.HtmlMarkdownExtractor import io.ktor.client.HttpClient import io.ktor.client.request.prepareGet import io.ktor.client.statement.bodyAsChannel diff --git a/infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/web/WebSearchTool.kt b/infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/web/WebSearchTool.kt similarity index 99% rename from infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/web/WebSearchTool.kt rename to infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/web/WebSearchTool.kt index f335caf6..1188379d 100644 --- a/infrastructure/research/src/main/kotlin/com/correx/infrastructure/research/web/WebSearchTool.kt +++ b/infrastructure/tools/src/main/kotlin/com/correx/infrastructure/tools/web/WebSearchTool.kt @@ -1,4 +1,4 @@ -package com.correx.infrastructure.research.web +package com.correx.infrastructure.tools.web import com.correx.core.approvals.Tier import com.correx.core.events.events.ToolRequest diff --git a/infrastructure/research/src/test/kotlin/com/correx/infrastructure/research/extract/HtmlMarkdownExtractorTest.kt b/infrastructure/tools/src/test/kotlin/com/correx/infrastructure/tools/extract/HtmlMarkdownExtractorTest.kt similarity index 99% rename from infrastructure/research/src/test/kotlin/com/correx/infrastructure/research/extract/HtmlMarkdownExtractorTest.kt rename to infrastructure/tools/src/test/kotlin/com/correx/infrastructure/tools/extract/HtmlMarkdownExtractorTest.kt index d163fdd2..22454c71 100644 --- a/infrastructure/research/src/test/kotlin/com/correx/infrastructure/research/extract/HtmlMarkdownExtractorTest.kt +++ b/infrastructure/tools/src/test/kotlin/com/correx/infrastructure/tools/extract/HtmlMarkdownExtractorTest.kt @@ -1,4 +1,4 @@ -package com.correx.infrastructure.research.extract +package com.correx.infrastructure.tools.extract import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertFalse diff --git a/infrastructure/research/src/test/kotlin/com/correx/infrastructure/research/web/WebFetchToolTest.kt b/infrastructure/tools/src/test/kotlin/com/correx/infrastructure/tools/web/WebFetchToolTest.kt similarity index 99% rename from infrastructure/research/src/test/kotlin/com/correx/infrastructure/research/web/WebFetchToolTest.kt rename to infrastructure/tools/src/test/kotlin/com/correx/infrastructure/tools/web/WebFetchToolTest.kt index 7c0e21c2..4ffb820a 100644 Binary files a/infrastructure/research/src/test/kotlin/com/correx/infrastructure/research/web/WebFetchToolTest.kt and b/infrastructure/tools/src/test/kotlin/com/correx/infrastructure/tools/web/WebFetchToolTest.kt differ diff --git a/infrastructure/research/src/test/kotlin/com/correx/infrastructure/research/web/WebSearchToolTest.kt b/infrastructure/tools/src/test/kotlin/com/correx/infrastructure/tools/web/WebSearchToolTest.kt similarity index 98% rename from infrastructure/research/src/test/kotlin/com/correx/infrastructure/research/web/WebSearchToolTest.kt rename to infrastructure/tools/src/test/kotlin/com/correx/infrastructure/tools/web/WebSearchToolTest.kt index c06f77bd..07b1a115 100644 --- a/infrastructure/research/src/test/kotlin/com/correx/infrastructure/research/web/WebSearchToolTest.kt +++ b/infrastructure/tools/src/test/kotlin/com/correx/infrastructure/tools/web/WebSearchToolTest.kt @@ -1,4 +1,4 @@ -package com.correx.infrastructure.research.web +package com.correx.infrastructure.tools.web import com.correx.core.approvals.Tier import com.correx.core.events.events.ToolRequest diff --git a/settings.gradle b/settings.gradle index a2ce3fc8..f10a760e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -39,7 +39,6 @@ include ':infrastructure:tools' include ':infrastructure:tools:filesystem' include ':infrastructure:workflow' include ':infrastructure:artifacts-cas' -include ':infrastructure:research' include ':testing:replay' include ':testing:contracts'