Manifest
Let's go through an example of the typical starthub.json file.
{
"name": "get-weather-by-location-name",
"description": "Get weather by location name",
"version": "0.0.1",
"kind": "composition",
"manifest_version": 1,
"repository": "github.com/tgirotto/get-weather-by-location-name",
"license": "MIT",
"inputs": [
{
"name": "weather_config",
"type": "WeatherConfig",
}
],
"steps": {
"get_coordinates": {
"uses": "tgirotto/openweather-coordinates-by-location-name:0.0.1",
"inputs": [
{
"location_name": "{{inputs[0].location_name}}",
"open_weather_api_key": "{{inputs[0].open_weather_api_key}}"
}
]
},
"get_weather": {
"uses": "tgirotto/openweather-current-weather:0.0.1",
"inputs": [
{
"lat": "{{steps.get_coordinates.outputs[0].lat}}",
"lon": "{{steps.get_coordinates.outputs[0].lon}}",
"open_weather_api_key": "{{inputs[0].open_weather_api_key}}"
}
]
}
},
"outputs": [
{
"name": "response",
"description": "Simplified weather information for the location",
"type": "CustomWeatherResponse",
"value": {
"location_name": "{{inputs[0].location_name}}",
"weather": "{{steps.get_weather.outputs[0].weather[0].description}}"
}
}
],
"types": {
"WeatherConfig": {
"location_name": "string",
"open_weather_api_key": "string"
},
"CustomWeatherResponse": {
"location_name": "string",
"weather": "string"
}
}
}
Name
Name of the action.
Description
Description of the action.
Version
Version of the action. Follows semantic versioning (e.g., "0.0.1", "1.2.3").
Kind
The type of action. Can be one of:
"docker"- A Docker-based action"wasm"- A WebAssembly-based action"composition"- A composite action composed of other actions
Manifest Version
Version of the manifest schema being used. Currently 1.
Repository
The repository URL where the action is hosted (e.g., "github.com/tgirotto/get-weather-by-location-name").
License
The license under which the action is distributed (e.g., "MIT", "Apache-2.0", "GPL-3.0").
Inputs
Array of input parameters that the action accepts. Each input has:
name- The name of the input parametertype- The type of the input (primitive or custom type)required- Whether the input is required (boolean)
Steps
For composition actions, defines the steps that make up the action. Each step:
uses- Reference to another action (format: "owner/action-name:version")inputs- Inputs passed to the step, which can reference parent inputs or outputs from previous steps using template syntax
Outputs
Array of output values that the action produces. Each output has:
name- The name of the outputdescription- Description of what the output containstype- The type of the output (primitive or custom type)value- The value expression, which can reference inputs or step outputs using template syntax
Types
Custom type definitions used in inputs and outputs. Defines the structure of complex types as key-value pairs where keys are property names and values are their types.