{
  "id": "task/python",
  "family": "runtime-cli",
  "description": "Compact Python output while preserving tracebacks, exceptions, and failed scripts.",
  "match": {
    "toolNames": ["exec"],
    "argv0": ["python", "python3"]
  },
  "transforms": {
    "stripAnsi": true,
    "dedupeAdjacent": true,
    "trimEmptyEdges": true
  },
  "summarize": {
    "head": 12,
    "tail": 12
  },
  "failure": {
    "preserveOnFailure": true,
    "head": 20,
    "tail": 20
  },
  "counters": [
    {
      "name": "error",
      "pattern": "Traceback|Error:|Exception|SyntaxError|ModuleNotFoundError|FAILED",
      "flags": "i"
    }
  ]
}
