refactor: retire sandbox dual-write; file tools write in-place into workspace

This commit is contained in:
2026-05-31 10:39:58 +04:00
parent 3c90ac4aef
commit 95e79bffb8
3 changed files with 34 additions and 77 deletions
@@ -1,7 +1,5 @@
package com.correx.infrastructure.tools
import com.correx.core.artifacts.MaterializingArtifactWriter
import com.correx.core.artifactstore.ArtifactStore
import com.correx.core.tools.contract.Tool
import com.correx.infrastructure.tools.filesystem.FileEditTool
import com.correx.infrastructure.tools.filesystem.FileReadTool
@@ -20,9 +18,6 @@ data class FileReadConfig(val enabled: Boolean = false, val allowedPaths: Set<Pa
data class FileWriteConfig(
val enabled: Boolean = false,
val allowedPaths: Set<Path> = emptySet(),
val artifactStore: ArtifactStore? = null,
val materializingWriter: MaterializingArtifactWriter? = null,
val sandboxRoot: Path? = null,
val workingDir: Path? = null,
)
@@ -61,9 +56,6 @@ fun ToolConfig.buildTools(): List<Tool> = buildList {
add(
FileWriteTool(
allowedPaths = fileWrite.allowedPaths,
artifactStore = fileWrite.artifactStore,
materializingWriter = fileWrite.materializingWriter,
sandboxRoot = fileWrite.sandboxRoot,
workingDir = fileWrite.workingDir,
),
)