refactor(imports): optimize imports
This commit is contained in:
@@ -3,9 +3,9 @@ package com.correx.core.approvals
|
||||
import com.correx.core.approvals.model.ApprovalContext
|
||||
import com.correx.core.approvals.model.ApprovalDecision
|
||||
import com.correx.core.approvals.model.ApprovalGrant
|
||||
import com.correx.core.approvals.model.DomainApprovalRequest
|
||||
import com.correx.core.approvals.model.ApprovalScopeIdentity
|
||||
import com.correx.core.approvals.model.ApprovalState
|
||||
import com.correx.core.approvals.model.DomainApprovalRequest
|
||||
import com.correx.core.events.events.ApprovalDecisionResolvedEvent
|
||||
import com.correx.core.events.events.ApprovalGrantCreatedEvent
|
||||
import com.correx.core.events.events.ApprovalGrantExpiredEvent
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package com.correx.core.approvals.domain
|
||||
|
||||
import com.correx.core.approvals.ApprovalOutcome
|
||||
import com.correx.core.approvals.ApprovalStatus
|
||||
import com.correx.core.approvals.GrantScope
|
||||
import com.correx.core.approvals.Tier
|
||||
import com.correx.core.approvals.isAtMost
|
||||
import com.correx.core.approvals.model.ApprovalContext
|
||||
import com.correx.core.approvals.model.ApprovalDecision
|
||||
import com.correx.core.approvals.model.ApprovalGrant
|
||||
import com.correx.core.approvals.ApprovalOutcome
|
||||
import com.correx.core.approvals.model.DomainApprovalRequest
|
||||
import com.correx.core.approvals.ApprovalStatus
|
||||
import com.correx.core.approvals.GrantScope
|
||||
import com.correx.core.events.types.ApprovalDecisionId
|
||||
import com.correx.core.sessions.ApprovalMode
|
||||
import kotlinx.datetime.Instant
|
||||
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
package com.correx.core.approvals.model
|
||||
|
||||
import com.correx.core.events.types.ProjectId
|
||||
import com.correx.core.events.types.StageId
|
||||
import com.correx.core.events.types.SessionId
|
||||
import com.correx.core.events.types.StageId
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
|
||||
@@ -10,8 +10,6 @@ import com.correx.core.events.events.StoredEvent
|
||||
import com.correx.core.events.events.ToolInvokedEvent
|
||||
import com.correx.core.events.types.ApprovalDecisionId
|
||||
import com.correx.core.events.types.ApprovalRequestId
|
||||
import com.correx.core.approvals.ApprovalOutcome
|
||||
import com.correx.core.approvals.ApprovalStatus
|
||||
import com.correx.core.events.types.EventId
|
||||
import com.correx.core.events.types.GrantId
|
||||
import com.correx.core.events.types.SessionId
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.correx.core.artifacts
|
||||
|
||||
import com.correx.core.events.events.StoredEvent
|
||||
import com.correx.core.sessions.projections.Projection
|
||||
import java.util.logging.Logger
|
||||
import java.util.logging.*
|
||||
|
||||
class ArtifactProjector(private val reducer: ArtifactReducer) : Projection<ArtifactState> {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.correx.core.events.types.CorrelationId
|
||||
import com.correx.core.events.types.EventId
|
||||
import com.correx.core.events.types.SessionId
|
||||
import kotlinx.datetime.Clock
|
||||
import java.util.UUID
|
||||
import java.util.*
|
||||
|
||||
class EventDispatcher(private val eventStore: EventStore) {
|
||||
suspend fun emit(
|
||||
|
||||
@@ -21,9 +21,9 @@ import com.correx.core.events.events.InferenceCompletedEvent
|
||||
import com.correx.core.events.events.InferenceFailedEvent
|
||||
import com.correx.core.events.events.InferenceStartedEvent
|
||||
import com.correx.core.events.events.InferenceTimeoutEvent
|
||||
import com.correx.core.events.events.LayerTruncatedEvent
|
||||
import com.correx.core.events.events.ModelLoadedEvent
|
||||
import com.correx.core.events.events.ModelUnloadedEvent
|
||||
import com.correx.core.events.events.LayerTruncatedEvent
|
||||
import com.correx.core.events.events.OrchestrationPausedEvent
|
||||
import com.correx.core.events.events.OrchestrationResumedEvent
|
||||
import com.correx.core.events.events.RetryAttemptedEvent
|
||||
@@ -40,8 +40,8 @@ import com.correx.core.events.events.ToolExecutionCompletedEvent
|
||||
import com.correx.core.events.events.ToolExecutionFailedEvent
|
||||
import com.correx.core.events.events.ToolExecutionRejectedEvent
|
||||
import com.correx.core.events.events.ToolExecutionStartedEvent
|
||||
import com.correx.core.events.events.ToolInvokedEvent
|
||||
import com.correx.core.events.events.ToolInvocationRequestedEvent
|
||||
import com.correx.core.events.events.ToolInvokedEvent
|
||||
import com.correx.core.events.events.TransitionExecutedEvent
|
||||
import com.correx.core.events.events.WorkflowCompletedEvent
|
||||
import com.correx.core.events.events.WorkflowFailedEvent
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.correx.core.inference
|
||||
|
||||
import com.correx.core.events.events.StoredEvent
|
||||
import com.correx.core.inference.InferenceState
|
||||
|
||||
interface InferenceReducer {
|
||||
fun reduce(state: InferenceState, event: StoredEvent): InferenceState
|
||||
|
||||
+6
-7
@@ -4,11 +4,13 @@ import com.correx.core.approvals.domain.NoOpApprovalEngine
|
||||
import com.correx.core.context.model.ContextPack
|
||||
import com.correx.core.events.events.ArtifactValidatedEvent
|
||||
import com.correx.core.events.events.ArtifactValidatingEvent
|
||||
import com.correx.core.events.stores.EventStore
|
||||
import com.correx.core.events.types.InferenceRequestId
|
||||
import com.correx.core.events.types.SessionId
|
||||
import com.correx.core.events.types.StageId
|
||||
import com.correx.core.inference.GenerationConfig
|
||||
import com.correx.core.inference.InferenceRequest
|
||||
import com.correx.core.kernel.execution.ReplayStrategy
|
||||
import com.correx.core.kernel.execution.WorkflowResult
|
||||
import com.correx.core.kernel.replay.ReplayInferenceProvider
|
||||
import com.correx.core.kernel.retry.exception.ReplayArtifactMissingException
|
||||
import com.correx.core.risk.NoOpRiskAssessor
|
||||
@@ -16,13 +18,10 @@ import com.correx.core.transitions.execution.StageExecutionResult
|
||||
import com.correx.core.transitions.graph.StageConfig
|
||||
import com.correx.core.transitions.graph.WorkflowGraph
|
||||
import com.correx.core.transitions.resolution.TransitionDecision
|
||||
import com.correx.core.events.types.SessionId
|
||||
import com.correx.core.events.types.StageId
|
||||
import com.correx.core.kernel.execution.WorkflowResult
|
||||
import com.correx.core.validation.model.ValidationContext
|
||||
import java.util.UUID
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
import java.util.*
|
||||
import java.util.concurrent.*
|
||||
import java.util.concurrent.atomic.*
|
||||
|
||||
private data class ReplayContext(
|
||||
val graph: WorkflowGraph,
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
package com.correx.core.kernel.retry
|
||||
|
||||
import com.correx.core.events.events.EventMetadata
|
||||
import com.correx.core.events.events.NewEvent
|
||||
import com.correx.core.events.execution.RetryPolicy
|
||||
import com.correx.core.events.events.RetryAttemptedEvent
|
||||
import com.correx.core.events.events.StoredEvent
|
||||
import com.correx.core.events.execution.RetryPolicy
|
||||
import com.correx.core.events.stores.EventStore
|
||||
import com.correx.core.events.types.EventId
|
||||
import com.correx.core.events.types.SessionId
|
||||
import com.correx.core.events.types.StageId
|
||||
import com.correx.core.events.events.EventMetadata
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlinx.coroutines.delay
|
||||
import java.util.UUID
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
import kotlin.coroutines.cancellation.CancellationException
|
||||
import kotlinx.datetime.Clock
|
||||
import java.util.*
|
||||
|
||||
class DefaultRetryCoordinator(
|
||||
private val eventStore: EventStore,
|
||||
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
package com.correx.core.transitions.analysis
|
||||
|
||||
import com.correx.core.events.types.StageId
|
||||
import com.correx.core.transitions.graph.TransitionEdge
|
||||
import com.correx.core.transitions.graph.WorkflowGraph
|
||||
import com.correx.core.events.types.StageId
|
||||
|
||||
internal class DeterministicAdjacencyBuilder {
|
||||
fun build(graph: WorkflowGraph): Map<StageId, List<TransitionEdge>> {
|
||||
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
package com.correx.core.transitions.execution
|
||||
|
||||
import com.correx.core.transitions.evaluation.EvaluationContext
|
||||
import com.correx.core.events.types.StageId
|
||||
import com.correx.core.events.types.TransitionId
|
||||
import com.correx.core.transitions.evaluation.EvaluationContext
|
||||
|
||||
data class StageExecutionRequest(
|
||||
val sessionId: String,
|
||||
|
||||
+1
-1
@@ -4,9 +4,9 @@ import com.correx.core.events.events.EventPayload
|
||||
import com.correx.core.events.events.StageCompletedEvent
|
||||
import com.correx.core.events.events.StageFailedEvent
|
||||
import com.correx.core.events.events.TransitionExecutedEvent
|
||||
import com.correx.core.events.types.SessionId
|
||||
import com.correx.core.transitions.execution.StageExecutionRequest
|
||||
import com.correx.core.transitions.execution.StageExecutionResult
|
||||
import com.correx.core.events.types.SessionId
|
||||
|
||||
class DefaultStageExecutionEventMapper : StageExecutionEventMapper {
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package com.correx.core.transitions.policy
|
||||
|
||||
import com.correx.core.events.types.StageId
|
||||
import java.util.SortedSet
|
||||
import java.util.*
|
||||
|
||||
data class CycleSignature(
|
||||
val nodes: SortedSet<StageId>,
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package com.correx.core.transitions.policy
|
||||
|
||||
import com.correx.core.events.types.StageId
|
||||
import com.correx.core.transitions.graph.TransitionEdge
|
||||
import java.util.TreeSet
|
||||
import java.util.*
|
||||
|
||||
object CycleSignatureFactory {
|
||||
fun from(nodes: List<StageId>, edges: List<TransitionEdge>): CycleSignature {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.correx.core.transitions.state
|
||||
|
||||
import com.correx.core.events.types.StageId
|
||||
import com.correx.core.transitions.analysis.DetectedCycle
|
||||
import com.correx.core.transitions.graph.TransitionEdge
|
||||
import com.correx.core.events.types.StageId
|
||||
|
||||
internal class CycleDfs {
|
||||
fun dfs(
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
package com.correx.core.validation.semantic.rules
|
||||
|
||||
import com.correx.core.transitions.policy.CycleSignature
|
||||
import com.correx.core.transitions.policy.CycleSignatureFactory
|
||||
import com.correx.core.validation.model.ValidationContext
|
||||
import com.correx.core.validation.model.ValidationIssue
|
||||
|
||||
Reference in New Issue
Block a user