package com.correx.core.artifacts.kind

object ProcessResultKind : ArtifactKind {
    override val id: String = "process_result"
    override val llmEmitted: Boolean = false

    override fun deriveJsonSchema(): JsonSchema = JsonSchema(
        type = "object",
        properties = mapOf(
            "status" to JsonSchemaProperty(type = "string", description = "\"success\" or \"failed\""),
            "command" to JsonSchemaProperty(type = "string"),
            "exitCode" to JsonSchemaProperty(type = "integer"),
            "stdout" to JsonSchemaProperty(type = "string"),
            "stderr" to JsonSchemaProperty(type = "string"),
            "durationMs" to JsonSchemaProperty(type = "integer"),
        ),
        required = listOf("status", "command", "exitCode", "stdout", "stderr", "durationMs"),
        additionalProperties = false,
    )
}
