feat(kernel): cache LLM-emitted artifact JSON for transition conditions
This commit is contained in:
+6
@@ -366,6 +366,12 @@ abstract class SessionOrchestrator(
|
||||
is InferenceResult.Failed -> StageExecutionResult.Failure(inferenceResult.reason, retryable = true)
|
||||
is InferenceResult.Success -> {
|
||||
if (isCancelled(sessionId)) return StageExecutionResult.Failure("CANCELLED", retryable = false)
|
||||
// Capture the LLM-emitted artifact's JSON so transition conditions
|
||||
// (e.g. ArtifactFieldEquals on a reviewer's verdict) can read it.
|
||||
llmEmittedSlots.firstOrNull()?.let { slot ->
|
||||
artifactContentCache["${sessionId.value}:${slot.name.value}"] =
|
||||
inferenceResult.response.text
|
||||
}
|
||||
val validationCtx = ValidationContext(
|
||||
graph = graph,
|
||||
sessionState = session.state,
|
||||
|
||||
Reference in New Issue
Block a user