Repository navigation
Feature/v0.4.0/structured output - #49
Merged
Merged
Conversation
… returns everywhere
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces significant improvements to task execution and observability:
1. Structured Task Response Envelope
Tasks now return a detailed JSON envelope containing execution metadata alongside results. This provides better visibility into task performance and error handling.
Example:
Response format:
{ "success": true, "result": { "status": "processed", "count": 42 }, "error": null, "execution": { "task_name": "data_processor", "duration_ms": 1523, "retries": 0, "fuel_consumed": 45000 } }Fields:
success: Boolean indicating task completion statusresult: The actual return value from the task (only present on success)error: Error details if the task failed (type and message)execution: Metadata about the task execution (name, duration, retry count, fuel consumption)2. Enhanced Logging with
--verboseImproved error messages with consistent formatting for better debugging:
Error categories:
response.resultinstead of usingresponsedirectly.