initial commit
This commit is contained in:
		
							
								
								
									
										213
									
								
								docs/openrpc.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										213
									
								
								docs/openrpc.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,213 @@
 | 
			
		||||
{
 | 
			
		||||
  "openrpc": "1.3.2",
 | 
			
		||||
  "info": {
 | 
			
		||||
    "title": "Hero Supervisor OpenRPC API",
 | 
			
		||||
    "version": "1.0.0",
 | 
			
		||||
    "description": "OpenRPC API for managing Hero Supervisor runners and jobs"
 | 
			
		||||
  },
 | 
			
		||||
  "methods": [
 | 
			
		||||
    {
 | 
			
		||||
      "name": "list_runners",
 | 
			
		||||
      "description": "List all registered runners",
 | 
			
		||||
      "params": [],
 | 
			
		||||
      "result": {
 | 
			
		||||
        "name": "runners",
 | 
			
		||||
        "schema": {
 | 
			
		||||
          "type": "array",
 | 
			
		||||
          "items": { "type": "string" }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "register_runner",
 | 
			
		||||
      "description": "Register a new runner to the supervisor with secret authentication",
 | 
			
		||||
      "params": [
 | 
			
		||||
        {
 | 
			
		||||
          "name": "params",
 | 
			
		||||
          "schema": {
 | 
			
		||||
            "type": "object",
 | 
			
		||||
            "properties": {
 | 
			
		||||
              "secret": { "type": "string" },
 | 
			
		||||
              "name": { "type": "string" },
 | 
			
		||||
              "queue": { "type": "string" }
 | 
			
		||||
            },
 | 
			
		||||
            "required": ["secret", "name", "queue"]
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      "result": {
 | 
			
		||||
        "name": "result",
 | 
			
		||||
        "schema": { "type": "null" }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "run_job",
 | 
			
		||||
      "description": "Run a job on the appropriate runner",
 | 
			
		||||
      "params": [
 | 
			
		||||
        {
 | 
			
		||||
          "name": "params",
 | 
			
		||||
          "schema": {
 | 
			
		||||
            "type": "object",
 | 
			
		||||
            "properties": {
 | 
			
		||||
              "secret": { "type": "string" },
 | 
			
		||||
              "job": {
 | 
			
		||||
                "type": "object",
 | 
			
		||||
                "properties": {
 | 
			
		||||
                  "id": { "type": "string" },
 | 
			
		||||
                  "caller_id": { "type": "string" },
 | 
			
		||||
                  "context_id": { "type": "string" },
 | 
			
		||||
                  "payload": { "type": "string" },
 | 
			
		||||
                  "job_type": { "type": "string" },
 | 
			
		||||
                  "runner_name": { "type": "string" },
 | 
			
		||||
                  "timeout": { "type": "number" },
 | 
			
		||||
                  "env_vars": { "type": "object" },
 | 
			
		||||
                  "created_at": { "type": "string" },
 | 
			
		||||
                  "updated_at": { "type": "string" }
 | 
			
		||||
                },
 | 
			
		||||
                "required": ["id", "caller_id", "context_id", "payload", "job_type", "runner_name", "timeout", "env_vars", "created_at", "updated_at"]
 | 
			
		||||
              }
 | 
			
		||||
            },
 | 
			
		||||
            "required": ["secret", "job"]
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      "result": {
 | 
			
		||||
        "name": "result",
 | 
			
		||||
        "schema": {
 | 
			
		||||
          "type": ["string", "null"]
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "remove_runner",
 | 
			
		||||
      "description": "Remove a runner from the supervisor",
 | 
			
		||||
      "params": [
 | 
			
		||||
        {
 | 
			
		||||
          "name": "actor_id",
 | 
			
		||||
          "schema": { "type": "string" }
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      "result": {
 | 
			
		||||
        "name": "result",
 | 
			
		||||
        "schema": { "type": "null" }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "start_runner",
 | 
			
		||||
      "description": "Start a specific runner",
 | 
			
		||||
      "params": [
 | 
			
		||||
        {
 | 
			
		||||
          "name": "actor_id",
 | 
			
		||||
          "schema": { "type": "string" }
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      "result": {
 | 
			
		||||
        "name": "result",
 | 
			
		||||
        "schema": { "type": "null" }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "stop_runner",
 | 
			
		||||
      "description": "Stop a specific runner",
 | 
			
		||||
      "params": [
 | 
			
		||||
        {
 | 
			
		||||
          "name": "actor_id",
 | 
			
		||||
          "schema": { "type": "string" }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "name": "force",
 | 
			
		||||
          "schema": { "type": "boolean" }
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      "result": {
 | 
			
		||||
        "name": "result",
 | 
			
		||||
        "schema": { "type": "null" }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "get_runner_status",
 | 
			
		||||
      "description": "Get the status of a specific runner",
 | 
			
		||||
      "params": [
 | 
			
		||||
        {
 | 
			
		||||
          "name": "actor_id",
 | 
			
		||||
          "schema": { "type": "string" }
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      "result": {
 | 
			
		||||
        "name": "status",
 | 
			
		||||
        "schema": { "type": "object" }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "get_all_runner_status",
 | 
			
		||||
      "description": "Get status of all runners",
 | 
			
		||||
      "params": [],
 | 
			
		||||
      "result": {
 | 
			
		||||
        "name": "statuses",
 | 
			
		||||
        "schema": {
 | 
			
		||||
          "type": "array",
 | 
			
		||||
          "items": { "type": "object" }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "start_all",
 | 
			
		||||
      "description": "Start all runners",
 | 
			
		||||
      "params": [],
 | 
			
		||||
      "result": {
 | 
			
		||||
        "name": "results",
 | 
			
		||||
        "schema": {
 | 
			
		||||
          "type": "array",
 | 
			
		||||
          "items": {
 | 
			
		||||
            "type": "array",
 | 
			
		||||
            "items": { "type": "string" }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "stop_all",
 | 
			
		||||
      "description": "Stop all runners",
 | 
			
		||||
      "params": [
 | 
			
		||||
        {
 | 
			
		||||
          "name": "force",
 | 
			
		||||
          "schema": { "type": "boolean" }
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      "result": {
 | 
			
		||||
        "name": "results",
 | 
			
		||||
        "schema": {
 | 
			
		||||
          "type": "array",
 | 
			
		||||
          "items": {
 | 
			
		||||
            "type": "array",
 | 
			
		||||
            "items": { "type": "string" }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "get_all_status",
 | 
			
		||||
      "description": "Get status of all runners (alternative format)",
 | 
			
		||||
      "params": [],
 | 
			
		||||
      "result": {
 | 
			
		||||
        "name": "statuses",
 | 
			
		||||
        "schema": {
 | 
			
		||||
          "type": "array",
 | 
			
		||||
          "items": {
 | 
			
		||||
            "type": "array",
 | 
			
		||||
            "items": { "type": "string" }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "rpc.discover",
 | 
			
		||||
      "description": "OpenRPC discovery method - returns the OpenRPC document describing this API",
 | 
			
		||||
      "params": [],
 | 
			
		||||
      "result": {
 | 
			
		||||
        "name": "openrpc_document",
 | 
			
		||||
        "schema": { "type": "object" }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user