mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 19:05:18 +00:00
feat: add structured stderr output for error diagnostics (#29)
Add StderrOutput schema with head/tail/truncated/total_lines fields to provide better error diagnostics when agent processes fail.
This commit is contained in:
parent
82ac0b3880
commit
c7d6482fd4
9 changed files with 247 additions and 3 deletions
|
|
@ -436,9 +436,35 @@
|
|||
"terminated_by"
|
||||
],
|
||||
"properties": {
|
||||
"exit_code": {
|
||||
"description": "Process exit code when reason is Error",
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"description": "Error message when reason is Error",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"reason": {
|
||||
"$ref": "#/definitions/SessionEndReason"
|
||||
},
|
||||
"stderr": {
|
||||
"description": "Agent stderr output when reason is Error",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/StderrOutput"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"terminated_by": {
|
||||
"$ref": "#/definitions/TerminatedBy"
|
||||
}
|
||||
|
|
@ -450,6 +476,41 @@
|
|||
"metadata": true
|
||||
}
|
||||
},
|
||||
"StderrOutput": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"truncated"
|
||||
],
|
||||
"properties": {
|
||||
"head": {
|
||||
"description": "First N lines of stderr (if truncated) or full stderr (if not truncated)",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"tail": {
|
||||
"description": "Last N lines of stderr (only present if truncated)",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"total_lines": {
|
||||
"description": "Total number of lines in stderr",
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"truncated": {
|
||||
"description": "Whether the output was truncated",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"TerminatedBy": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue