{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agent-service.spec/v1/schemas/resources/run-link.json",
  "type": "object",
  "additionalProperties": false,
  "required": ["linkId", "parentRunId", "childRunId", "relationType", "createdAt"],
  "properties": {
    "linkId": {
      "$ref": "../common/identity.json#/$defs/runLinkId"
    },
    "parentRunId": {
      "$ref": "../common/identity.json#/$defs/runId"
    },
    "childRunId": {
      "$ref": "../common/identity.json#/$defs/runId"
    },
    "relationType": {
      "$ref": "../common/enums.json#/$defs/runLinkRelationType"
    },
    "inheritsIdentity": {
      "type": "boolean"
    },
    "propagatesCancel": {
      "type": "boolean"
    },
    "attachResultAsArtifact": {
      "type": "boolean"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true
    },
    "createdAt": {
      "$ref": "../common/identity.json#/$defs/timestamp"
    }
  }
}
