Merge remote-tracking branch 'origin/feat/session-robustness-and-dox' into feat/session-robustness-and-dox

This commit is contained in:
2026-06-29 20:58:07 +04:00
29 changed files with 1047 additions and 272 deletions
@@ -1,6 +1,7 @@
package com.correx.infrastructure.tools
import com.correx.core.tools.contract.Tool
import com.correx.infrastructure.tools.filesystem.FileDeleteTool
import com.correx.infrastructure.tools.filesystem.FileEditTool
import com.correx.infrastructure.tools.filesystem.FileReadTool
import com.correx.infrastructure.tools.filesystem.FileWriteTool
@@ -81,6 +82,14 @@ fun ToolConfig.buildTools(): List<Tool> = buildList {
workingDir = fileWrite.workingDir,
),
)
// file_delete is the explicit, separately-named deletion capability split out of
// file_write; it shares the writer's path jail and is gated by the same fileWrite toggle.
add(
FileDeleteTool(
allowedPaths = fileWrite.allowedPaths,
workingDir = fileWrite.workingDir,
),
)
}
if (fileEdit.enabled) {
add(
@@ -65,7 +65,7 @@ class SandboxedToolExecutorFileMutationTest {
private fun writeRequest(path: String, content: String) = ToolRequest(
ToolInvocationId("inv"), SessionId("s"), StageId("st"), "file_write",
mapOf("operation" to "write", "path" to path, "content" to content),
mapOf("path" to path, "content" to content),
)
private fun executor(tool: FileWriteTool, store: FakeArtifactStore, events: CapturingEventStore) =