{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.nylorun.com/schemas/agent-manifest/v8.4.json",
  "title": "Nylorun agent manifest 8",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string"
    },
    "manifestSchemaVersion": {
      "type": "number",
      "const": 8
    },
    "name": {
      "type": "string",
      "description": "An agent manifest's name, such as `triage`"
    },
    "description": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "harness": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "description": "A path to a harness.manifest.json file, relative to this file"
        },
        {
          "type": "object",
          "properties": {
            "$schema": {
              "type": "string"
            },
            "id": {
              "description": "The harness that runs the loop: `nylorun` (ours, the default) or a custom harness's id",
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{1,62}$"
            },
            "instructions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "skills": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "description": "A path to a folder of skill folders, relative to this file"
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "description": {
                        "type": "string",
                        "minLength": 1
                      },
                      "files": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "plugin": {
                        "$ref": "#/$defs/PluginLabel"
                      },
                      "secrets": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                        }
                      }
                    },
                    "required": [
                      "name",
                      "description",
                      "files"
                    ],
                    "additionalProperties": false
                  }
                }
              ]
            },
            "mcpServers": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "description": "A path to an mcp.json file, relative to this file"
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "streamable-http"
                          },
                          "name": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,64}$"
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1
                          },
                          "headers": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "credential": {
                            "type": "string",
                            "minLength": 1
                          },
                          "deferred": {
                            "type": "boolean"
                          },
                          "tools": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string",
                              "minLength": 1
                            },
                            "additionalProperties": {
                              "$ref": "#/$defs/McpToolSettings"
                            }
                          },
                          "plugin": {
                            "$ref": "#/$defs/PluginLabel"
                          }
                        },
                        "required": [
                          "type",
                          "name",
                          "url"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "sse"
                          },
                          "name": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{1,64}$"
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1
                          },
                          "headers": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "credential": {
                            "type": "string",
                            "minLength": 1
                          },
                          "deferred": {
                            "type": "boolean"
                          },
                          "tools": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string",
                              "minLength": 1
                            },
                            "additionalProperties": {
                              "$ref": "#/$defs/McpToolSettings"
                            }
                          },
                          "plugin": {
                            "$ref": "#/$defs/PluginLabel"
                          }
                        },
                        "required": [
                          "type",
                          "name",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  }
                }
              ]
            },
            "plugins": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "description": "A path to an Agent Plugin folder, relative to this file"
                  },
                  {
                    "$ref": "#/$defs/PluginLabel"
                  }
                ]
              }
            },
            "outputSchema": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "loop": {
              "description": "The harness's own settings, passed to it in turn.start; the Runtime never reads them",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "memory": {
              "description": "The Agent's memory: Markdown files under /memories it keeps across sessions",
              "type": "object",
              "properties": {
                "access": {
                  "description": "`read_write` (the default) or `read_only`",
                  "type": "string",
                  "enum": [
                    "read_write",
                    "read_only"
                  ]
                },
                "instructions": {
                  "description": "What this agent should remember, after the engine's own memory rules",
                  "type": "string",
                  "maxLength": 4096
                },
                "index": {
                  "description": "agent-folder/2: false pins no memory index in a session. Default true",
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            },
            "model": {
              "type": "string",
              "maxLength": 200,
              "pattern": "^[A-Za-z0-9._-]+\\/\\S+$",
              "description": "The model the agent runs on: <provider>/<model>, such as anthropic/claude-sonnet-4-5"
            },
            "engine": {
              "$ref": "#/$defs/HarnessEngine"
            },
            "credentials": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "minLength": 1
              },
              "additionalProperties": {
                "type": "string",
                "minLength": 1
              }
            },
            "requires": {
              "type": "object",
              "properties": {
                "sandbox": {
                  "type": "string",
                  "enum": [
                    "none",
                    "any",
                    "pod"
                  ]
                },
                "secrets": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        {
          "$ref": "#/$defs/WorkflowHarnessSection"
        }
      ]
    },
    "runtime": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "description": "A path to a runtime.manifest.json file, relative to this file"
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "virtual",
                "pod",
                "none"
              ]
            },
            "image": {
              "type": "string",
              "minLength": 1
            },
            "resources": {
              "type": "object",
              "properties": {
                "cpus": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                },
                "memory": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "storage": {
              "type": "string"
            },
            "network": {
              "type": "object",
              "properties": {
                "allowedHosts": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            },
            "lifecycle": {
              "type": "object",
              "properties": {
                "idle": {
                  "type": "string"
                },
                "deleteAfter": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "setup": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "command": {
                    "type": "string",
                    "minLength": 1
                  },
                  "cwd": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024
                  },
                  "timeout": {
                    "type": "string"
                  }
                },
                "required": [
                  "command"
                ],
                "additionalProperties": false
              }
            },
            "files": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "artifactId": {
                            "type": "string"
                          },
                          "version": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "path": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          }
                        },
                        "required": [
                          "artifactId",
                          "version",
                          "path"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024
                          },
                          "files": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1024
                            },
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "path",
                          "files"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string",
                        "minLength": 1
                      },
                      "from": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "path",
                      "from"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "limits": {
              "type": "object",
              "properties": {
                "artifacts": {
                  "type": "object",
                  "properties": {
                    "fileBytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "totalBytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "additionalProperties": false
                },
                "skills": {
                  "type": "object",
                  "properties": {
                    "totalBytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "additionalProperties": false
                },
                "disk": {
                  "type": "object",
                  "properties": {
                    "versionBytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "versionEntries": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "additionalProperties": false
                },
                "triggers": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "minIntervalMs": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "runsPerHour": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            },
            "secrets": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "environment_secret"
                      },
                      "allowedHosts": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "inject": {
                        "type": "object",
                        "properties": {
                          "header": {
                            "type": "string",
                            "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
                          },
                          "format": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "header",
                          "format"
                        ],
                        "additionalProperties": false
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "allowedHosts"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "environment_variable"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "bearer"
                      },
                      "url": {
                        "type": "string",
                        "minLength": 1
                      },
                      "via": {
                        "type": "string"
                      },
                      "identity": {
                        "type": "object",
                        "properties": {
                          "header": {
                            "type": "string",
                            "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
                          }
                        },
                        "required": [
                          "header"
                        ],
                        "additionalProperties": false
                      },
                      "toolPrefix": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[\\x21-\\x7e]+$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "url"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "headers"
                      },
                      "url": {
                        "type": "string",
                        "minLength": 1
                      },
                      "via": {
                        "type": "string"
                      },
                      "identity": {
                        "type": "object",
                        "properties": {
                          "header": {
                            "type": "string",
                            "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
                          }
                        },
                        "required": [
                          "header"
                        ],
                        "additionalProperties": false
                      },
                      "toolPrefix": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[\\x21-\\x7e]+$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "url"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "triggers": {
              "description": "What starts the Agent's turns with no client connected, by trigger id",
              "type": "object",
              "propertyNames": {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
                "description": "A trigger's id, such as `hourly-check`"
              },
              "additionalProperties": {
                "$ref": "#/$defs/Trigger"
              }
            },
            "selfWake": {
              "description": "Offer the agent schedule_wake: it books its session's next turn itself",
              "type": "boolean"
            },
            "$schema": {
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "manifestSchemaVersion",
    "name",
    "harness"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,64}$"
        },
        "description": {
          "type": "string"
        },
        "inputSchema": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "outputSchema": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "agent": {
          "$ref": "#/$defs/ToolAgentManifest"
        },
        "http": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string"
            },
            "method": {
              "type": "string",
              "enum": [
                "GET",
                "POST",
                "PUT",
                "PATCH",
                "DELETE"
              ]
            },
            "credential": {
              "type": "string",
              "minLength": 1
            },
            "timeoutMs": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 2147483647
            }
          },
          "required": [
            "url"
          ],
          "additionalProperties": false
        },
        "approval": {
          "type": "string",
          "enum": [
            "never",
            "always"
          ]
        },
        "fn": {
          "description": "Reserved for a later kind of tool; refused for now."
        },
        "command": {
          "description": "Reserved for a later kind of tool; refused for now."
        }
      },
      "required": [
        "name",
        "inputSchema"
      ],
      "additionalProperties": false
    },
    "ToolAgentManifest": {
      "anyOf": [
        {
          "$ref": "#/$defs/WorkflowManifest"
        },
        {
          "type": "object",
          "properties": {
            "manifestSchemaVersion": {
              "type": "number",
              "const": 7
            },
            "id": {
              "type": "string",
              "minLength": 1
            },
            "name": {
              "type": "string",
              "minLength": 1
            },
            "description": {
              "type": "string"
            },
            "metadata": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "outputSchema": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "instructions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "tools": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "skills": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1
                  },
                  "files": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "plugin": {
                    "$ref": "#/$defs/PluginLabel"
                  }
                },
                "required": [
                  "name",
                  "description",
                  "files"
                ],
                "additionalProperties": false
              }
            },
            "mcpServers": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_-]{1,64}$"
                      },
                      "type": {
                        "type": "string",
                        "const": "streamable-http"
                      },
                      "url": {
                        "type": "string",
                        "minLength": 1
                      },
                      "headers": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "approval": {
                        "type": "string",
                        "enum": [
                          "never",
                          "always"
                        ]
                      },
                      "deferred": {
                        "type": "boolean"
                      },
                      "tools": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "minLength": 1
                        },
                        "additionalProperties": {
                          "$ref": "#/$defs/McpToolSettings"
                        }
                      },
                      "plugin": {
                        "$ref": "#/$defs/PluginLabel"
                      }
                    },
                    "required": [
                      "name",
                      "type",
                      "url"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_-]{1,64}$"
                      },
                      "type": {
                        "type": "string",
                        "const": "sse"
                      },
                      "url": {
                        "type": "string",
                        "minLength": 1
                      },
                      "headers": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "approval": {
                        "type": "string",
                        "enum": [
                          "never",
                          "always"
                        ]
                      },
                      "deferred": {
                        "type": "boolean"
                      },
                      "tools": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "minLength": 1
                        },
                        "additionalProperties": {
                          "$ref": "#/$defs/McpToolSettings"
                        }
                      },
                      "plugin": {
                        "$ref": "#/$defs/PluginLabel"
                      }
                    },
                    "required": [
                      "name",
                      "type",
                      "url"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "requires": {
              "type": "object",
              "properties": {
                "sandbox": {
                  "type": "string",
                  "enum": [
                    "none",
                    "any",
                    "pod"
                  ]
                },
                "secrets": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                  }
                }
              },
              "additionalProperties": false
            },
            "engine": {
              "$ref": "#/$defs/HarnessEngine"
            },
            "functions": {
              "description": "Reserved: Functions are not available yet"
            }
          },
          "required": [
            "manifestSchemaVersion",
            "id"
          ],
          "additionalProperties": false
        }
      ]
    },
    "WorkflowManifest": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "workflow"
        },
        "workflowSchemaVersion": {
          "type": "number",
          "const": 3
        },
        "id": {
          "type": "string",
          "minLength": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string"
        },
        "metadata": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "inputSchema": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "outputSchema": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "sandbox": {
          "type": "object",
          "properties": {
            "image": {
              "type": "string",
              "minLength": 1
            },
            "network": {
              "type": "object",
              "properties": {
                "preset": {
                  "type": "string",
                  "enum": [
                    "none",
                    "dev",
                    "open"
                  ]
                },
                "allow": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            },
            "resources": {
              "type": "object",
              "properties": {
                "cpus": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                },
                "memory": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "idle": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "root": {
          "$ref": "#/$defs/WorkflowNode"
        },
        "agents": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "minLength": 1
          },
          "additionalProperties": {
            "anyOf": [
              {
                "$ref": "#/$defs/WorkflowManifest"
              },
              {
                "type": "object",
                "properties": {
                  "manifestSchemaVersion": {
                    "type": "number",
                    "const": 7
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "outputSchema": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "instructions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema0"
                    }
                  },
                  "skills": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1
                        },
                        "files": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "plugin": {
                          "$ref": "#/$defs/PluginLabel"
                        }
                      },
                      "required": [
                        "name",
                        "description",
                        "files"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "mcpServers": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9_-]{1,64}$"
                            },
                            "type": {
                              "type": "string",
                              "const": "streamable-http"
                            },
                            "url": {
                              "type": "string",
                              "minLength": 1
                            },
                            "headers": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {
                                "type": "string"
                              }
                            },
                            "approval": {
                              "type": "string",
                              "enum": [
                                "never",
                                "always"
                              ]
                            },
                            "deferred": {
                              "type": "boolean"
                            },
                            "tools": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1
                              },
                              "additionalProperties": {
                                "$ref": "#/$defs/McpToolSettings"
                              }
                            },
                            "plugin": {
                              "$ref": "#/$defs/PluginLabel"
                            }
                          },
                          "required": [
                            "name",
                            "type",
                            "url"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9_-]{1,64}$"
                            },
                            "type": {
                              "type": "string",
                              "const": "sse"
                            },
                            "url": {
                              "type": "string",
                              "minLength": 1
                            },
                            "headers": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {
                                "type": "string"
                              }
                            },
                            "approval": {
                              "type": "string",
                              "enum": [
                                "never",
                                "always"
                              ]
                            },
                            "deferred": {
                              "type": "boolean"
                            },
                            "tools": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1
                              },
                              "additionalProperties": {
                                "$ref": "#/$defs/McpToolSettings"
                              }
                            },
                            "plugin": {
                              "$ref": "#/$defs/PluginLabel"
                            }
                          },
                          "required": [
                            "name",
                            "type",
                            "url"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "requires": {
                    "type": "object",
                    "properties": {
                      "sandbox": {
                        "type": "string",
                        "enum": [
                          "none",
                          "any",
                          "pod"
                        ]
                      },
                      "secrets": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "engine": {
                    "$ref": "#/$defs/HarnessEngine"
                  },
                  "functions": {
                    "description": "Reserved: Functions are not available yet"
                  }
                },
                "required": [
                  "manifestSchemaVersion",
                  "id"
                ],
                "additionalProperties": false
              }
            ]
          }
        }
      },
      "required": [
        "kind",
        "workflowSchemaVersion",
        "id",
        "root",
        "agents"
      ],
      "additionalProperties": false
    },
    "WorkflowNode": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "agent": {
              "type": "string",
              "minLength": 1
            },
            "id": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "agent"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "tool": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "description": {
                  "type": "string"
                },
                "inputSchema": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "outputSchema": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "http": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "GET",
                        "POST",
                        "PUT",
                        "PATCH",
                        "DELETE"
                      ]
                    },
                    "credential": {
                      "type": "string",
                      "minLength": 1
                    },
                    "timeoutMs": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 2147483647
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "name"
              ],
              "additionalProperties": false
            },
            "id": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "tool"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "chain": {
              "minItems": 1,
              "type": "array",
              "items": {
                "$ref": "#/$defs/WorkflowNode"
              }
            },
            "id": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "chain"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "switch": {
              "type": "object",
              "properties": {
                "cases": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "$ref": "#/$defs/WorkflowNode"
                  }
                },
                "default": {
                  "$ref": "#/$defs/WorkflowNode"
                }
              },
              "required": [
                "cases"
              ],
              "additionalProperties": false
            },
            "id": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "switch"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "parallel": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/$defs/WorkflowNode"
              }
            },
            "id": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "parallel"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "map": {
              "type": "object",
              "properties": {
                "each": {
                  "$ref": "#/$defs/WorkflowNode"
                }
              },
              "required": [
                "each"
              ],
              "additionalProperties": false
            },
            "id": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "map"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "loop": {
              "type": "object",
              "properties": {
                "run": {
                  "$ref": "#/$defs/WorkflowNode"
                },
                "verify": {
                  "$ref": "#/$defs/WorkflowLoopVerify"
                },
                "max": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "run",
                "verify",
                "max"
              ],
              "additionalProperties": false
            },
            "id": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "loop"
          ],
          "additionalProperties": false
        }
      ]
    },
    "WorkflowLoopVerify": {
      "type": "object",
      "properties": {
        "agent": {
          "type": "string",
          "minLength": 1
        },
        "http": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string"
            },
            "method": {
              "type": "string",
              "enum": [
                "GET",
                "POST",
                "PUT",
                "PATCH",
                "DELETE"
              ]
            },
            "credential": {
              "type": "string",
              "minLength": 1
            },
            "timeoutMs": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 2147483647
            }
          },
          "required": [
            "url"
          ],
          "additionalProperties": false
        },
        "fn": {
          "description": "Reserved for a later kind of verifier; refused for now."
        },
        "command": {
          "description": "Reserved for a later kind of verifier; refused for now."
        },
        "id": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "PluginLabel": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "version": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "McpToolSettings": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "approval": {
          "type": "string",
          "enum": [
            "never",
            "always"
          ]
        },
        "deferred": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "HarnessEngine": {
      "type": "object",
      "properties": {
        "sandbox": {
          "description": "The sandbox tools offered: any of bash, read, write, edit, grep and glob; needs a computer",
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "bash",
              "read",
              "write",
              "edit",
              "grep",
              "glob"
            ]
          }
        },
        "artifacts": {
          "description": "read: read_artifact and its text; save: save_artifact and its text (needs a computer)",
          "type": "object",
          "properties": {
            "read": {
              "type": "boolean"
            },
            "save": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "outputs": {
          "description": "Save /workspace/outputs when a turn ends; needs a computer",
          "type": "boolean"
        },
        "toolSearch": {
          "description": "Defer MCP tools behind tool_search when their schemas pass the threshold",
          "type": "boolean"
        },
        "triggers": {
          "description": "The triggers tool and its text: the root agent sets up its own triggers; never a subagent's",
          "type": "boolean"
        },
        "instructions": {
          "description": "A block's wording replaced, by block name",
          "type": "object",
          "propertyNames": {
            "type": "string",
            "enum": [
              "skills",
              "sandbox",
              "skill_folder",
              "artifacts_save",
              "outputs",
              "artifacts_read",
              "wake",
              "triggers",
              "memory",
              "plan",
              "connection",
              "tool_search"
            ]
          },
          "additionalProperties": {
            "type": "string",
            "minLength": 1
          }
        },
        "blocks": {
          "description": "The engine text blocks the agent gets, with their hashes",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "skills",
                  "sandbox",
                  "skill_folder",
                  "artifacts_save",
                  "outputs",
                  "artifacts_read",
                  "wake",
                  "triggers",
                  "memory",
                  "plan",
                  "connection",
                  "tool_search"
                ]
              },
              "version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "sha256": {
                "type": "string",
                "pattern": "^sha256:[0-9a-f]{64}$"
              },
              "source": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "name",
              "version",
              "sha256"
            ],
            "additionalProperties": false
          }
        },
        "plugins": {
          "description": "The Runtime's plugins the agent declares (agent-folder/3, ADR-106): each with the tools left on and the hash of its files",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "enum": [
                  "nylorun-memory",
                  "nylorun-triggers",
                  "nylorun-plan",
                  "nylorun-interactions",
                  "nylorun-artifacts",
                  "nylorun-sandbox"
                ]
              },
              "tools": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "sha256": {
                "type": "string",
                "pattern": "^sha256:[0-9a-f]{64}$"
              },
              "hosts": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "name",
              "tools",
              "sha256"
            ],
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "WorkflowHarnessSection": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "workflow"
        },
        "id": {
          "description": "The harness that runs the loop: `nylorun` (ours, the default) or a custom harness's id",
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{1,62}$"
        },
        "inputSchema": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "outputSchema": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "root": {
          "$ref": "#/$defs/WorkflowNode"
        },
        "agents": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "minLength": 1
          },
          "additionalProperties": {
            "anyOf": [
              {
                "$ref": "#/$defs/WorkflowManifest"
              },
              {
                "type": "object",
                "properties": {
                  "manifestSchemaVersion": {
                    "type": "number",
                    "const": 7
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "outputSchema": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "instructions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema0"
                    }
                  },
                  "skills": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1
                        },
                        "files": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "plugin": {
                          "$ref": "#/$defs/PluginLabel"
                        }
                      },
                      "required": [
                        "name",
                        "description",
                        "files"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "mcpServers": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9_-]{1,64}$"
                            },
                            "type": {
                              "type": "string",
                              "const": "streamable-http"
                            },
                            "url": {
                              "type": "string",
                              "minLength": 1
                            },
                            "headers": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {
                                "type": "string"
                              }
                            },
                            "approval": {
                              "type": "string",
                              "enum": [
                                "never",
                                "always"
                              ]
                            },
                            "deferred": {
                              "type": "boolean"
                            },
                            "tools": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1
                              },
                              "additionalProperties": {
                                "$ref": "#/$defs/McpToolSettings"
                              }
                            },
                            "plugin": {
                              "$ref": "#/$defs/PluginLabel"
                            }
                          },
                          "required": [
                            "name",
                            "type",
                            "url"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9_-]{1,64}$"
                            },
                            "type": {
                              "type": "string",
                              "const": "sse"
                            },
                            "url": {
                              "type": "string",
                              "minLength": 1
                            },
                            "headers": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {
                                "type": "string"
                              }
                            },
                            "approval": {
                              "type": "string",
                              "enum": [
                                "never",
                                "always"
                              ]
                            },
                            "deferred": {
                              "type": "boolean"
                            },
                            "tools": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1
                              },
                              "additionalProperties": {
                                "$ref": "#/$defs/McpToolSettings"
                              }
                            },
                            "plugin": {
                              "$ref": "#/$defs/PluginLabel"
                            }
                          },
                          "required": [
                            "name",
                            "type",
                            "url"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "requires": {
                    "type": "object",
                    "properties": {
                      "sandbox": {
                        "type": "string",
                        "enum": [
                          "none",
                          "any",
                          "pod"
                        ]
                      },
                      "secrets": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "engine": {
                    "$ref": "#/$defs/HarnessEngine"
                  },
                  "functions": {
                    "description": "Reserved: Functions are not available yet"
                  }
                },
                "required": [
                  "manifestSchemaVersion",
                  "id"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "plugins": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PluginLabel"
          }
        },
        "loop": {
          "description": "The harness's own settings, passed to it in turn.start; the Runtime never reads them",
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "kind",
        "root",
        "agents"
      ],
      "additionalProperties": false
    },
    "Trigger": {
      "type": "object",
      "properties": {
        "schedule": {
          "type": "string",
          "pattern": "^\\S+(\\s+\\S+){4}$"
        },
        "timezone": {
          "type": "string",
          "minLength": 1
        },
        "at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        "webhook": {
          "type": "string",
          "enum": [
            "standard-webhooks"
          ]
        },
        "session": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "prompt": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "session",
        "prompt"
      ],
      "additionalProperties": false
    }
  }
}
