refactor(imports): optimize imports

This commit is contained in:
2026-05-16 11:43:16 +04:00
parent c77277af0b
commit ce723afc8b
50 changed files with 67 additions and 88 deletions
@@ -1,8 +1,6 @@
package com.correx.infrastructure.inference.commons
import com.correx.core.events.types.ProviderId
import com.correx.core.inference.InferenceProvider
import com.correx.core.inference.Tokenizer
/**
* A wrapper around [InferenceProvider] that tracks model lifecycle.
@@ -5,7 +5,7 @@ import com.correx.core.inference.InferenceProvider
import com.correx.core.inference.ModelCapability
import com.correx.core.inference.ProviderHealth
import com.correx.core.inference.ProviderRegistry
import java.util.concurrent.CopyOnWriteArrayList
import java.util.concurrent.*
/**
* In-memory [ProviderRegistry] backed by a [CopyOnWriteArrayList] for safe concurrent reads.
@@ -1,10 +1,10 @@
package com.correx.infrastructure.inference
import com.correx.core.events.types.StageId
import com.correx.core.inference.InferenceProvider
import com.correx.core.inference.ModelCapability
import com.correx.core.inference.NoEligibleProviderException
import com.correx.core.inference.RoutingStrategy
import com.correx.core.events.types.StageId
/**
* Selects the first [InferenceProvider] from [candidates] whose declared capabilities
@@ -7,8 +7,8 @@ import com.correx.core.inference.InferenceRequest
import com.correx.core.inference.InferenceResponse
import com.correx.core.inference.ModelCapability
import com.correx.core.inference.ProviderHealth
import com.correx.core.inference.Tokenizer
import com.correx.core.inference.Token
import com.correx.core.inference.Tokenizer
import com.correx.core.utils.TypeId
import kotlinx.coroutines.test.runTest
import org.junit.jupiter.api.Assertions.assertEquals
@@ -1,7 +1,7 @@
package com.correx.infrastructure.persistence
import com.correx.testing.contracts.fixtures.events.store.EventStoreContractTest
import com.correx.core.events.stores.EventStore
import com.correx.testing.contracts.fixtures.events.store.EventStoreContractTest
class InMemoryEventStoreTest : EventStoreContractTest() {
override fun store(): EventStore = InMemoryEventStore()
@@ -1,10 +1,10 @@
package com.correx.infrastructure.persistence
import com.correx.core.events.stores.EventStore
import com.correx.core.sessions.projections.replay.DefaultEventReplayer
import com.correx.core.sessions.projections.replay.EventReplayer
import com.correx.core.sessions.SessionCounterProjection
import com.correx.core.sessions.SessionCounterState
import com.correx.core.sessions.projections.replay.DefaultEventReplayer
import com.correx.core.sessions.projections.replay.EventReplayer
import com.correx.testing.contracts.fixtures.projections.SessionReplayContractTest
class InMemoryReplayTest : SessionReplayContractTest() {
@@ -1,7 +1,7 @@
package com.correx.infrastructure.persistence
import com.correx.testing.contracts.fixtures.events.store.EventStoreContractTest
import com.correx.core.events.stores.EventStore
import com.correx.testing.contracts.fixtures.events.store.EventStoreContractTest
import java.sql.DriverManager
class SqliteEventStoreTest : EventStoreContractTest() {
@@ -1,10 +1,10 @@
package com.correx.infrastructure.persistence
import com.correx.core.events.stores.EventStore
import com.correx.core.sessions.projections.replay.DefaultEventReplayer
import com.correx.core.sessions.projections.replay.EventReplayer
import com.correx.core.sessions.SessionCounterProjection
import com.correx.core.sessions.SessionCounterState
import com.correx.core.sessions.projections.replay.DefaultEventReplayer
import com.correx.core.sessions.projections.replay.EventReplayer
import com.correx.testing.contracts.fixtures.projections.SessionReplayContractTest
import java.sql.DriverManager
@@ -8,10 +8,10 @@ import com.correx.core.inference.InferenceProvider
import com.correx.core.inference.InferenceRouter
import com.correx.core.inference.ProviderRegistry
import com.correx.core.inference.RoutingStrategy
import com.correx.infrastructure.inference.DefaultProviderRegistry
import com.correx.infrastructure.inference.FirstAvailableRoutingStrategy
import com.correx.core.tools.contract.ToolExecutor
import com.correx.core.tools.registry.ToolRegistry
import com.correx.infrastructure.inference.DefaultProviderRegistry
import com.correx.infrastructure.inference.FirstAvailableRoutingStrategy
import com.correx.infrastructure.inference.commons.ModelManager
import com.correx.infrastructure.inference.llama.cpp.DefaultModelManager
import com.correx.infrastructure.persistence.SqliteEventStore
@@ -20,10 +20,6 @@ import com.correx.infrastructure.tools.DispatchingToolExecutor
import com.correx.infrastructure.tools.SandboxedToolExecutor
import com.correx.infrastructure.tools.ToolConfig
import com.correx.infrastructure.tools.buildTools
import com.correx.infrastructure.tools.filesystem.FileEditTool
import com.correx.infrastructure.tools.filesystem.FileReadTool
import com.correx.infrastructure.tools.filesystem.FileWriteTool
import com.correx.infrastructure.tools.shell.ShellTool
import io.ktor.client.HttpClient
import java.nio.file.Path
import java.sql.DriverManager
@@ -1,19 +1,17 @@
package com.correx.infrastructure.tools.filesystem
import com.correx.core.events.events.ToolRequest
import com.correx.core.events.types.SessionId
import com.correx.core.events.types.StageId
import com.correx.core.events.types.ToolInvocationId
import com.correx.core.events.events.ToolRequest
import com.correx.core.tools.contract.ToolResult
import com.correx.core.tools.contract.ValidationResult
import kotlinx.coroutines.runBlocking
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertFalse
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
import java.nio.file.Files
import java.nio.file.Path
import java.util.UUID
import java.util.*
class FileEditToolTest {
@@ -1,18 +1,18 @@
package com.correx.infrastructure.tools.filesystem
import com.correx.core.events.events.ToolRequest
import com.correx.core.events.types.SessionId
import com.correx.core.events.types.StageId
import com.correx.core.events.types.ToolInvocationId
import com.correx.core.tools.contract.ToolResult
import com.correx.core.tools.contract.ValidationResult
import com.correx.core.events.events.ToolRequest
import kotlinx.coroutines.runBlocking
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertFalse
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
import java.nio.file.Files
import java.util.UUID
import java.util.*
class FileReadToolTest {
@@ -1,19 +1,18 @@
package com.correx.infrastructure.tools.filesystem
import com.correx.core.events.events.ToolRequest
import com.correx.core.events.types.SessionId
import com.correx.core.events.types.StageId
import com.correx.core.events.types.ToolInvocationId
import com.correx.core.tools.contract.ToolResult
import com.correx.core.tools.contract.ValidationResult
import com.correx.core.events.events.ToolRequest
import kotlinx.coroutines.runBlocking
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertFalse
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
import java.nio.file.Files
import java.nio.file.Path
import java.util.UUID
import java.util.*
class FileWriteToolTest {
@@ -11,7 +11,7 @@ import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertFalse
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
import java.util.UUID
import java.util.*
class ShellToolTest {