{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://suss.dev/schemas/behavioral-summary.schema.json",
  "title": "BehavioralSummaryArray",
  "description": "Array of behavioral summaries, see https://github.com/nimbuscloud-ai/suss/blob/main/docs/reference/summary-format.md",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "schemaVersion": {
        "type": "number"
      },
      "kind": {
        "type": "string",
        "enum": [
          "handler",
          "loader",
          "action",
          "component",
          "hook",
          "middleware",
          "resolver",
          "consumer",
          "client",
          "worker",
          "library",
          "caller",
          "module-init",
          "scheduled-callback"
        ]
      },
      "location": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string"
          },
          "range": {
            "type": "object",
            "properties": {
              "start": {
                "type": "number"
              },
              "end": {
                "type": "number"
              }
            },
            "required": ["start", "end"],
            "additionalProperties": false
          },
          "span": {
            "type": "object",
            "properties": {
              "start": {
                "type": "number"
              },
              "end": {
                "type": "number"
              }
            },
            "required": ["start", "end"],
            "additionalProperties": false
          },
          "exportName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "workspace": {
            "type": "string"
          }
        },
        "required": ["file", "range", "exportName"],
        "additionalProperties": false
      },
      "identity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nameKind": {
            "type": "string",
            "enum": ["binding", "label"]
          },
          "exportPath": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "boundaryBinding": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "transport": {
                    "type": "string"
                  },
                  "semantics": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "const": "rest"
                          },
                          "method": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "path": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "declaredResponses": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          }
                        },
                        "required": ["name", "method", "path"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "const": "function-call"
                          },
                          "module": {
                            "type": "string"
                          },
                          "exportName": {
                            "type": "string"
                          },
                          "package": {
                            "type": "string"
                          },
                          "exportPath": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": ["name"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "const": "graphql-resolver"
                          },
                          "typeName": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fieldName": {
                            "type": "string"
                          }
                        },
                        "required": ["name", "typeName", "fieldName"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "const": "graphql-operation"
                          },
                          "operationName": {
                            "type": "string"
                          },
                          "operationType": {
                            "type": "string",
                            "enum": ["query", "mutation", "subscription"]
                          }
                        },
                        "required": ["name", "operationType"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "deploymentTarget": {
                            "type": "string",
                            "enum": [
                              "lambda",
                              "ecs-task",
                              "container",
                              "k8s-deployment",
                              "worker"
                            ]
                          },
                          "instanceName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "name": {
                            "type": "string",
                            "const": "runtime-config"
                          }
                        },
                        "required": ["name"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "const": "storage"
                          },
                          "storageSystem": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scope": {
                            "type": "string"
                          },
                          "container": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "accessPath": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "storageSystem",
                          "scope",
                          "container",
                          "accessPath"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "const": "message-bus"
                          },
                          "messageBus": {
                            "type": "string",
                            "enum": [
                              "aws_sqs",
                              "aws.sns",
                              "s3",
                              "eventbridge",
                              "aws_kinesis",
                              "aws_firehose",
                              "gcp_pubsub",
                              "bullmq",
                              "kafka",
                              "nats",
                              "cloudflare-queues",
                              "cloudflare-cron",
                              "cloudflare-tail"
                            ]
                          },
                          "channel": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": ["name", "messageBus", "channel"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "const": "metric"
                          },
                          "metricSystem": {
                            "type": "string"
                          },
                          "metricType": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": ["name", "metricSystem", "metricType"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "deploymentTarget": {
                            "type": "string",
                            "enum": [
                              "lambda",
                              "ecs-task",
                              "container",
                              "k8s-deployment",
                              "worker"
                            ]
                          },
                          "instanceName": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "type": "string",
                            "const": "unit-invocation"
                          }
                        },
                        "required": [
                          "deploymentTarget",
                          "instanceName",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "recognition": {
                    "type": "string"
                  }
                },
                "required": ["transport", "semantics", "recognition"],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "deployableUnit": {
            "type": "object",
            "properties": {
              "deploymentTarget": {
                "type": "string",
                "enum": [
                  "lambda",
                  "ecs-task",
                  "container",
                  "k8s-deployment",
                  "worker"
                ]
              },
              "instanceName": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["deploymentTarget", "instanceName"],
            "additionalProperties": false
          }
        },
        "required": ["name", "exportPath", "boundaryBinding"],
        "additionalProperties": false
      },
      "inputs": {
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "parameter"
                },
                "name": {
                  "type": "string"
                },
                "position": {
                  "type": "number"
                },
                "role": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shape": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/__schema0"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": ["type", "name", "position", "role", "shape"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "injection"
                },
                "name": {
                  "type": "string"
                },
                "mechanism": {
                  "type": "string"
                },
                "shape": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/__schema0"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": ["type", "name", "mechanism", "shape"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "hookReturn"
                },
                "hook": {
                  "type": "string"
                },
                "destructuredFields": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": ["type", "hook", "destructuredFields"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "contextValue"
                },
                "context": {
                  "type": "string"
                },
                "accessedFields": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": ["type", "context", "accessedFields"],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "closure"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": ["type", "name"],
              "additionalProperties": false
            }
          ]
        }
      },
      "transitions": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "conditions": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema1"
              }
            },
            "output": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "response"
                    },
                    "statusCode": {
                      "anyOf": [
                        {
                          "$ref": "#/$defs/__schema2"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "body": {
                      "anyOf": [
                        {
                          "$ref": "#/$defs/__schema0"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "headers": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "$ref": "#/$defs/__schema2"
                      }
                    }
                  },
                  "required": ["type", "statusCode", "body", "headers"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "throw"
                    },
                    "exceptionType": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "message": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": ["type", "exceptionType", "message"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "render"
                    },
                    "component": {
                      "type": "string"
                    },
                    "props": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "root": {
                      "$ref": "#/$defs/__schema3"
                    }
                  },
                  "required": ["type", "component"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "return"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "$ref": "#/$defs/__schema0"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": ["type", "value"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "delegate"
                    },
                    "to": {
                      "type": "string"
                    }
                  },
                  "required": ["type", "to"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "emit"
                    },
                    "event": {
                      "type": "string"
                    },
                    "payload": {
                      "$ref": "#/$defs/__schema0"
                    }
                  },
                  "required": ["type", "event"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "void"
                    }
                  },
                  "required": ["type"],
                  "additionalProperties": false
                }
              ]
            },
            "effects": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer",
                        "minimum": 2,
                        "maximum": 9007199254740991
                      },
                      "type": {
                        "type": "string",
                        "const": "mutation"
                      },
                      "target": {
                        "type": "string"
                      },
                      "operation": {
                        "type": "string",
                        "enum": ["create", "update", "delete"]
                      }
                    },
                    "required": ["type", "target", "operation"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer",
                        "minimum": 2,
                        "maximum": 9007199254740991
                      },
                      "type": {
                        "type": "string",
                        "const": "invocation"
                      },
                      "callee": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "declaredAt": {
                        "type": "object",
                        "properties": {
                          "file": {
                            "type": "string"
                          },
                          "span": {
                            "type": "object",
                            "properties": {
                              "start": {
                                "type": "number"
                              },
                              "end": {
                                "type": "number"
                              }
                            },
                            "required": ["start", "end"],
                            "additionalProperties": false
                          }
                        },
                        "required": ["file", "span"],
                        "additionalProperties": false
                      },
                      "argsDeclaredAt": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "file": {
                              "type": "string"
                            },
                            "span": {
                              "type": "object",
                              "properties": {
                                "start": {
                                  "type": "number"
                                },
                                "end": {
                                  "type": "number"
                                }
                              },
                              "required": ["start", "end"],
                              "additionalProperties": false
                            }
                          },
                          "required": ["file", "span"],
                          "additionalProperties": false
                        }
                      },
                      "argsSummary": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "calleeParameter": {
                        "type": "number"
                      },
                      "args": {
                        "type": "array",
                        "items": {}
                      },
                      "async": {
                        "type": "boolean"
                      },
                      "preconditions": {
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/__schema1"
                        }
                      }
                    },
                    "required": ["type", "callee", "args", "async"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer",
                        "minimum": 2,
                        "maximum": 9007199254740991
                      },
                      "type": {
                        "type": "string",
                        "const": "emission"
                      },
                      "event": {
                        "type": "string"
                      },
                      "payload": {}
                    },
                    "required": ["type", "event"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer",
                        "minimum": 2,
                        "maximum": 9007199254740991
                      },
                      "type": {
                        "type": "string",
                        "const": "stateChange"
                      },
                      "variable": {
                        "type": "string"
                      },
                      "newValue": {}
                    },
                    "required": ["type", "variable"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer",
                        "minimum": 2,
                        "maximum": 9007199254740991
                      },
                      "type": {
                        "type": "string",
                        "const": "interaction"
                      },
                      "binding": {
                        "type": "object",
                        "properties": {
                          "transport": {
                            "type": "string"
                          },
                          "semantics": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "const": "rest"
                                  },
                                  "method": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "path": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "declaredResponses": {
                                    "type": "array",
                                    "items": {
                                      "type": "number"
                                    }
                                  }
                                },
                                "required": ["name", "method", "path"],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "const": "function-call"
                                  },
                                  "module": {
                                    "type": "string"
                                  },
                                  "exportName": {
                                    "type": "string"
                                  },
                                  "package": {
                                    "type": "string"
                                  },
                                  "exportPath": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "required": ["name"],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "const": "graphql-resolver"
                                  },
                                  "typeName": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "fieldName": {
                                    "type": "string"
                                  }
                                },
                                "required": ["name", "typeName", "fieldName"],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "const": "graphql-operation"
                                  },
                                  "operationName": {
                                    "type": "string"
                                  },
                                  "operationType": {
                                    "type": "string",
                                    "enum": [
                                      "query",
                                      "mutation",
                                      "subscription"
                                    ]
                                  }
                                },
                                "required": ["name", "operationType"],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "deploymentTarget": {
                                    "type": "string",
                                    "enum": [
                                      "lambda",
                                      "ecs-task",
                                      "container",
                                      "k8s-deployment",
                                      "worker"
                                    ]
                                  },
                                  "instanceName": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "name": {
                                    "type": "string",
                                    "const": "runtime-config"
                                  }
                                },
                                "required": ["name"],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "const": "storage"
                                  },
                                  "storageSystem": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "scope": {
                                    "type": "string"
                                  },
                                  "container": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "accessPath": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "name",
                                  "storageSystem",
                                  "scope",
                                  "container",
                                  "accessPath"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "const": "message-bus"
                                  },
                                  "messageBus": {
                                    "type": "string",
                                    "enum": [
                                      "aws_sqs",
                                      "aws.sns",
                                      "s3",
                                      "eventbridge",
                                      "aws_kinesis",
                                      "aws_firehose",
                                      "gcp_pubsub",
                                      "bullmq",
                                      "kafka",
                                      "nats",
                                      "cloudflare-queues",
                                      "cloudflare-cron",
                                      "cloudflare-tail"
                                    ]
                                  },
                                  "channel": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": ["name", "messageBus", "channel"],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "const": "metric"
                                  },
                                  "metricSystem": {
                                    "type": "string"
                                  },
                                  "metricType": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "name",
                                  "metricSystem",
                                  "metricType"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "deploymentTarget": {
                                    "type": "string",
                                    "enum": [
                                      "lambda",
                                      "ecs-task",
                                      "container",
                                      "k8s-deployment",
                                      "worker"
                                    ]
                                  },
                                  "instanceName": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "name": {
                                    "type": "string",
                                    "const": "unit-invocation"
                                  }
                                },
                                "required": [
                                  "deploymentTarget",
                                  "instanceName",
                                  "name"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "recognition": {
                            "type": "string"
                          }
                        },
                        "required": ["transport", "semantics", "recognition"],
                        "additionalProperties": false
                      },
                      "callee": {
                        "type": "string"
                      },
                      "groupId": {
                        "type": "string"
                      },
                      "preconditions": {
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/__schema1"
                        }
                      },
                      "interaction": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "class": {
                                "type": "string",
                                "const": "storage-access"
                              },
                              "kind": {
                                "type": "string",
                                "enum": ["read", "write"]
                              },
                              "fields": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "selector": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "operation": {
                                "type": "string"
                              },
                              "relationPath": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "relationKey": {
                                "type": "boolean"
                              }
                            },
                            "required": ["class", "kind", "fields"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "class": {
                                "type": "string",
                                "const": "service-call"
                              },
                              "method": {
                                "type": "string"
                              },
                              "payload": {},
                              "responseShape": {
                                "$ref": "#/$defs/__schema0"
                              }
                            },
                            "required": ["class", "method"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "class": {
                                "type": "string",
                                "const": "message-send"
                              },
                              "body": {},
                              "routingKey": {
                                "type": "string"
                              }
                            },
                            "required": ["class"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "class": {
                                "type": "string",
                                "const": "unit-invoke"
                              },
                              "payload": {}
                            },
                            "required": ["class"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "class": {
                                "type": "string",
                                "const": "message-receive"
                              },
                              "body": {}
                            },
                            "required": ["class"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "class": {
                                "type": "string",
                                "const": "config-read"
                              },
                              "name": {
                                "type": "string"
                              },
                              "defaulted": {
                                "type": "boolean"
                              }
                            },
                            "required": ["class", "name", "defaulted"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "class": {
                                "type": "string",
                                "const": "metadata-read"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": ["class", "name"],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "class": {
                                "type": "string",
                                "const": "schedule"
                              },
                              "via": {
                                "type": "string"
                              },
                              "callbackRef": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "literal"
                                      }
                                    },
                                    "required": ["type"],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "identifier"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": ["type", "name"],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "opaque"
                                      },
                                      "reason": {
                                        "type": "string"
                                      }
                                    },
                                    "required": ["type", "reason"],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "hasDelay": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "class",
                              "via",
                              "callbackRef",
                              "hasDelay"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": ["type", "binding", "interaction"],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "location": {
              "type": "object",
              "properties": {
                "start": {
                  "type": "number"
                },
                "end": {
                  "type": "number"
                }
              },
              "required": ["start", "end"],
              "additionalProperties": false
            },
            "isDefault": {
              "type": "boolean"
            },
            "confidence": {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string",
                  "enum": [
                    "inferred_static",
                    "inferred_ai",
                    "declared",
                    "derived"
                  ]
                },
                "level": {
                  "type": "string",
                  "enum": ["high", "medium", "low"]
                },
                "corroboration": {
                  "type": "object",
                  "properties": {
                    "outcome": {
                      "type": "string",
                      "enum": ["observed", "refuted", "untested"]
                    },
                    "runs": {
                      "type": "number"
                    },
                    "counterexample": {},
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": ["outcome", "runs"],
                  "additionalProperties": false
                }
              },
              "required": ["source", "level"],
              "additionalProperties": false
            },
            "expectedInput": {
              "$ref": "#/$defs/__schema0"
            },
            "metadata": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "required": [
            "id",
            "conditions",
            "output",
            "effects",
            "location",
            "isDefault"
          ],
          "additionalProperties": false
        }
      },
      "gaps": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": ["unhandledCase", "unreadOutcome", "unfollowedCall"]
            },
            "conditions": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema1"
              }
            },
            "consequence": {
              "type": "string",
              "enum": [
                "frameworkDefault",
                "implicitThrow",
                "fallthrough",
                "unknown"
              ]
            },
            "description": {
              "type": "string"
            },
            "callee": {
              "type": "string"
            }
          },
          "required": ["type", "conditions", "consequence", "description"],
          "additionalProperties": false
        }
      },
      "confidence": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "enum": ["inferred_static", "inferred_ai", "declared", "derived"]
          },
          "level": {
            "type": "string",
            "enum": ["high", "medium", "low"]
          },
          "corroboration": {
            "type": "object",
            "properties": {
              "outcome": {
                "type": "string",
                "enum": ["observed", "refuted", "untested"]
              },
              "runs": {
                "type": "number"
              },
              "counterexample": {},
              "reason": {
                "type": "string"
              }
            },
            "required": ["outcome", "runs"],
            "additionalProperties": false
          }
        },
        "required": ["source", "level"],
        "additionalProperties": false
      },
      "definitions": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "$ref": "#/$defs/__schema0"
        }
      },
      "inputReads": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "input": {
              "type": "string"
            },
            "path": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": ["input", "path"],
          "additionalProperties": false
        }
      },
      "metadata": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      }
    },
    "required": [
      "kind",
      "location",
      "identity",
      "inputs",
      "transitions",
      "gaps",
      "confidence"
    ],
    "additionalProperties": false
  },
  "$defs": {
    "__schema0": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "record"
            },
            "properties": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "spreads": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "sourceText": {
                    "type": "string"
                  }
                },
                "required": ["sourceText"],
                "additionalProperties": false
              }
            }
          },
          "required": ["type", "properties"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "dictionary"
            },
            "values": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": ["type", "values"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "array"
            },
            "items": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": ["type", "items"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "literal"
            },
            "value": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "raw": {
              "type": "string"
            }
          },
          "required": ["type", "value"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "text"
            }
          },
          "required": ["type"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "integer"
            }
          },
          "required": ["type"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "number"
            }
          },
          "required": ["type"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "boolean"
            }
          },
          "required": ["type"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "null"
            }
          },
          "required": ["type"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "undefined"
            }
          },
          "required": ["type"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "union"
            },
            "variants": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            }
          },
          "required": ["type", "variants"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "ref"
            },
            "name": {
              "type": "string"
            },
            "from": {
              "type": "string"
            },
            "def": {
              "type": "string"
            }
          },
          "required": ["type", "name"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "unknown"
            }
          },
          "required": ["type"],
          "additionalProperties": false
        }
      ]
    },
    "__schema1": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "nullCheck"
            },
            "subject": {
              "$ref": "#/$defs/__schema2"
            },
            "negated": {
              "type": "boolean"
            }
          },
          "required": ["type", "subject", "negated"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "truthinessCheck"
            },
            "subject": {
              "$ref": "#/$defs/__schema2"
            },
            "negated": {
              "type": "boolean"
            }
          },
          "required": ["type", "subject", "negated"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "comparison"
            },
            "left": {
              "$ref": "#/$defs/__schema2"
            },
            "op": {
              "type": "string",
              "enum": ["eq", "neq", "gt", "gte", "lt", "lte"]
            },
            "right": {
              "$ref": "#/$defs/__schema2"
            }
          },
          "required": ["type", "left", "op", "right"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "typeCheck"
            },
            "subject": {
              "$ref": "#/$defs/__schema2"
            },
            "expectedType": {
              "type": "string"
            }
          },
          "required": ["type", "subject", "expectedType"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "propertyExists"
            },
            "subject": {
              "$ref": "#/$defs/__schema2"
            },
            "property": {
              "type": "string"
            },
            "negated": {
              "type": "boolean"
            }
          },
          "required": ["type", "subject", "property", "negated"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "compound"
            },
            "op": {
              "type": "string",
              "enum": ["and", "or"]
            },
            "operands": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema1"
              }
            }
          },
          "required": ["type", "op", "operands"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "negation"
            },
            "operand": {
              "$ref": "#/$defs/__schema1"
            }
          },
          "required": ["type", "operand"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "call"
            },
            "callee": {
              "type": "string"
            },
            "args": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema2"
              }
            }
          },
          "required": ["type", "callee", "args"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "opaque"
            },
            "sourceText": {
              "type": "string"
            },
            "reason": {
              "type": "string",
              "enum": [
                "complexExpression",
                "externalFunction",
                "dynamicValue",
                "unsupportedSyntax"
              ]
            }
          },
          "required": ["type", "sourceText", "reason"],
          "additionalProperties": false
        }
      ]
    },
    "__schema2": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "input"
            },
            "inputRef": {
              "type": "string"
            },
            "path": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": ["type", "inputRef", "path"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "dependency"
            },
            "name": {
              "type": "string"
            },
            "accessChain": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": ["type", "name", "accessChain"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "derived"
            },
            "from": {
              "$ref": "#/$defs/__schema2"
            },
            "derivation": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "propertyAccess"
                    },
                    "property": {
                      "type": "string"
                    }
                  },
                  "required": ["type", "property"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "methodCall"
                    },
                    "method": {
                      "type": "string"
                    },
                    "args": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": ["type", "method", "args"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "destructured"
                    },
                    "field": {
                      "type": "string"
                    }
                  },
                  "required": ["type", "field"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "awaited"
                    }
                  },
                  "required": ["type"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "indexAccess"
                    },
                    "index": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    }
                  },
                  "required": ["type", "index"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "required": ["type", "from", "derivation"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "literal"
            },
            "value": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["type", "value"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "state"
            },
            "name": {
              "type": "string"
            }
          },
          "required": ["type", "name"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "unresolved"
            },
            "sourceText": {
              "type": "string"
            }
          },
          "required": ["type", "sourceText"],
          "additionalProperties": false
        }
      ]
    },
    "__schema3": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "element"
            },
            "tag": {
              "type": "string"
            },
            "attrs": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            },
            "target": {
              "type": "object",
              "properties": {
                "file": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": ["file", "name"],
              "additionalProperties": false
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema3"
              }
            }
          },
          "required": ["type", "tag", "children"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "text"
            },
            "value": {
              "type": "string"
            }
          },
          "required": ["type", "value"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "expression"
            },
            "sourceText": {
              "type": "string"
            }
          },
          "required": ["type", "sourceText"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "conditional"
            },
            "condition": {
              "type": "string"
            },
            "whenTrue": {
              "$ref": "#/$defs/__schema3"
            },
            "whenFalse": {
              "anyOf": [
                {
                  "$ref": "#/$defs/__schema3"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["type", "condition", "whenTrue", "whenFalse"],
          "additionalProperties": false
        }
      ]
    }
  }
}
