[WIP] workflow builder
This commit is contained in:
@@ -15,145 +15,140 @@ parameter_format: dotenv
|
||||
# Output format: json (structured data parsing enabled)
|
||||
output_format: json
|
||||
|
||||
# Action parameters schema
|
||||
# Action parameters schema (StackStorm-style with inline required/secret)
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
pack_paths:
|
||||
type: array
|
||||
description: "List of pack directory paths to build environments for"
|
||||
items:
|
||||
type: string
|
||||
minItems: 1
|
||||
packs_base_dir:
|
||||
pack_paths:
|
||||
type: array
|
||||
description: "List of pack directory paths to build environments for"
|
||||
required: true
|
||||
items:
|
||||
type: string
|
||||
description: "Base directory where packs are installed"
|
||||
default: "/opt/attune/packs"
|
||||
python_version:
|
||||
type: string
|
||||
description: "Python version to use for virtualenvs"
|
||||
default: "3.11"
|
||||
nodejs_version:
|
||||
type: string
|
||||
description: "Node.js version to use"
|
||||
default: "20"
|
||||
skip_python:
|
||||
type: boolean
|
||||
description: "Skip building Python environments"
|
||||
default: false
|
||||
skip_nodejs:
|
||||
type: boolean
|
||||
description: "Skip building Node.js environments"
|
||||
default: false
|
||||
force_rebuild:
|
||||
type: boolean
|
||||
description: "Force rebuild of existing environments"
|
||||
default: false
|
||||
timeout:
|
||||
type: integer
|
||||
description: "Timeout in seconds for building each environment"
|
||||
default: 600
|
||||
minimum: 60
|
||||
maximum: 3600
|
||||
required:
|
||||
- pack_paths
|
||||
minItems: 1
|
||||
packs_base_dir:
|
||||
type: string
|
||||
description: "Base directory where packs are installed"
|
||||
default: "/opt/attune/packs"
|
||||
python_version:
|
||||
type: string
|
||||
description: "Python version to use for virtualenvs"
|
||||
default: "3.11"
|
||||
nodejs_version:
|
||||
type: string
|
||||
description: "Node.js version to use"
|
||||
default: "20"
|
||||
skip_python:
|
||||
type: boolean
|
||||
description: "Skip building Python environments"
|
||||
default: false
|
||||
skip_nodejs:
|
||||
type: boolean
|
||||
description: "Skip building Node.js environments"
|
||||
default: false
|
||||
force_rebuild:
|
||||
type: boolean
|
||||
description: "Force rebuild of existing environments"
|
||||
default: false
|
||||
timeout:
|
||||
type: integer
|
||||
description: "Timeout in seconds for building each environment"
|
||||
default: 600
|
||||
minimum: 60
|
||||
maximum: 3600
|
||||
|
||||
# Output schema: describes the JSON structure written to stdout
|
||||
# Note: stdout/stderr/exit_code are captured automatically by the execution system
|
||||
output_schema:
|
||||
type: object
|
||||
properties:
|
||||
built_environments:
|
||||
type: array
|
||||
description: "List of successfully built environments"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
pack_path:
|
||||
type: string
|
||||
description: "Pack directory path"
|
||||
environments:
|
||||
type: object
|
||||
description: "Built environments for this pack"
|
||||
properties:
|
||||
python:
|
||||
type: object
|
||||
description: "Python environment details"
|
||||
properties:
|
||||
virtualenv_path:
|
||||
type: string
|
||||
description: "Path to Python virtualenv"
|
||||
requirements_installed:
|
||||
type: boolean
|
||||
description: "Whether requirements.txt was installed"
|
||||
package_count:
|
||||
type: integer
|
||||
description: "Number of packages installed"
|
||||
python_version:
|
||||
type: string
|
||||
description: "Python version used"
|
||||
nodejs:
|
||||
type: object
|
||||
description: "Node.js environment details"
|
||||
properties:
|
||||
node_modules_path:
|
||||
type: string
|
||||
description: "Path to node_modules directory"
|
||||
dependencies_installed:
|
||||
type: boolean
|
||||
description: "Whether package.json was installed"
|
||||
package_count:
|
||||
type: integer
|
||||
description: "Number of packages installed"
|
||||
nodejs_version:
|
||||
type: string
|
||||
description: "Node.js version used"
|
||||
duration_ms:
|
||||
type: integer
|
||||
description: "Time taken to build environments in milliseconds"
|
||||
failed_environments:
|
||||
type: array
|
||||
description: "List of packs where environment build failed"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
pack_path:
|
||||
type: string
|
||||
description: "Pack directory path"
|
||||
runtime:
|
||||
type: string
|
||||
description: "Runtime that failed (python or nodejs)"
|
||||
error:
|
||||
type: string
|
||||
description: "Error message"
|
||||
summary:
|
||||
built_environments:
|
||||
type: array
|
||||
description: "List of successfully built environments"
|
||||
items:
|
||||
type: object
|
||||
description: "Summary of environment build process"
|
||||
properties:
|
||||
total_packs:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
pack_path:
|
||||
type: string
|
||||
description: "Pack directory path"
|
||||
environments:
|
||||
type: object
|
||||
description: "Built environments for this pack"
|
||||
properties:
|
||||
python:
|
||||
type: object
|
||||
description: "Python environment details"
|
||||
properties:
|
||||
virtualenv_path:
|
||||
type: string
|
||||
description: "Path to Python virtualenv"
|
||||
requirements_installed:
|
||||
type: boolean
|
||||
description: "Whether requirements.txt was installed"
|
||||
package_count:
|
||||
type: integer
|
||||
description: "Number of packages installed"
|
||||
python_version:
|
||||
type: string
|
||||
description: "Python version used"
|
||||
nodejs:
|
||||
type: object
|
||||
description: "Node.js environment details"
|
||||
properties:
|
||||
node_modules_path:
|
||||
type: string
|
||||
description: "Path to node_modules directory"
|
||||
dependencies_installed:
|
||||
type: boolean
|
||||
description: "Whether package.json was installed"
|
||||
package_count:
|
||||
type: integer
|
||||
description: "Number of packages installed"
|
||||
nodejs_version:
|
||||
type: string
|
||||
description: "Node.js version used"
|
||||
duration_ms:
|
||||
type: integer
|
||||
description: "Total number of packs processed"
|
||||
success_count:
|
||||
type: integer
|
||||
description: "Number of packs with successful builds"
|
||||
failure_count:
|
||||
type: integer
|
||||
description: "Number of packs with failed builds"
|
||||
python_envs_built:
|
||||
type: integer
|
||||
description: "Number of Python environments built"
|
||||
nodejs_envs_built:
|
||||
type: integer
|
||||
description: "Number of Node.js environments built"
|
||||
total_duration_ms:
|
||||
type: integer
|
||||
description: "Total time taken for all builds in milliseconds"
|
||||
description: "Time taken to build environments in milliseconds"
|
||||
failed_environments:
|
||||
type: array
|
||||
description: "List of packs where environment build failed"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
pack_path:
|
||||
type: string
|
||||
description: "Pack directory path"
|
||||
runtime:
|
||||
type: string
|
||||
description: "Runtime that failed (python or nodejs)"
|
||||
error:
|
||||
type: string
|
||||
description: "Error message"
|
||||
summary:
|
||||
type: object
|
||||
description: "Summary of environment build process"
|
||||
properties:
|
||||
total_packs:
|
||||
type: integer
|
||||
description: "Total number of packs processed"
|
||||
success_count:
|
||||
type: integer
|
||||
description: "Number of packs with successful builds"
|
||||
failure_count:
|
||||
type: integer
|
||||
description: "Number of packs with failed builds"
|
||||
python_envs_built:
|
||||
type: integer
|
||||
description: "Number of Python environments built"
|
||||
nodejs_envs_built:
|
||||
type: integer
|
||||
description: "Number of Node.js environments built"
|
||||
total_duration_ms:
|
||||
type: integer
|
||||
description: "Total time taken for all builds in milliseconds"
|
||||
|
||||
# Tags for categorization
|
||||
tags:
|
||||
|
||||
@@ -15,101 +15,96 @@ parameter_format: dotenv
|
||||
# Output format: json (structured data parsing enabled)
|
||||
output_format: json
|
||||
|
||||
# Action parameters schema
|
||||
# Action parameters schema (StackStorm-style with inline required/secret)
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
packs:
|
||||
type: array
|
||||
description: "List of packs to download (git URLs, HTTP URLs, or pack refs)"
|
||||
items:
|
||||
type: string
|
||||
minItems: 1
|
||||
destination_dir:
|
||||
packs:
|
||||
type: array
|
||||
description: "List of packs to download (git URLs, HTTP URLs, or pack refs)"
|
||||
items:
|
||||
type: string
|
||||
description: "Destination directory for downloaded packs"
|
||||
registry_url:
|
||||
type: string
|
||||
description: "Pack registry URL for resolving pack refs (optional)"
|
||||
default: "https://registry.attune.io/index.json"
|
||||
ref_spec:
|
||||
type: string
|
||||
description: "Git reference to checkout (branch, tag, or commit) - applies to all git URLs"
|
||||
timeout:
|
||||
type: integer
|
||||
description: "Download timeout in seconds per pack"
|
||||
default: 300
|
||||
minimum: 10
|
||||
maximum: 3600
|
||||
verify_ssl:
|
||||
type: boolean
|
||||
description: "Verify SSL certificates for HTTPS downloads"
|
||||
default: true
|
||||
api_url:
|
||||
type: string
|
||||
description: "Attune API URL for making registry lookups"
|
||||
default: "http://localhost:8080"
|
||||
required:
|
||||
- packs
|
||||
- destination_dir
|
||||
minItems: 1
|
||||
required: true
|
||||
destination_dir:
|
||||
type: string
|
||||
description: "Destination directory for downloaded packs"
|
||||
required: true
|
||||
registry_url:
|
||||
type: string
|
||||
description: "Pack registry URL for resolving pack refs (optional)"
|
||||
default: "https://registry.attune.io/index.json"
|
||||
ref_spec:
|
||||
type: string
|
||||
description: "Git reference to checkout (branch, tag, or commit) - applies to all git URLs"
|
||||
timeout:
|
||||
type: integer
|
||||
description: "Download timeout in seconds per pack"
|
||||
default: 300
|
||||
minimum: 10
|
||||
maximum: 3600
|
||||
verify_ssl:
|
||||
type: boolean
|
||||
description: "Verify SSL certificates for HTTPS downloads"
|
||||
default: true
|
||||
api_url:
|
||||
type: string
|
||||
description: "Attune API URL for making registry lookups"
|
||||
default: "http://localhost:8080"
|
||||
|
||||
# Output schema: describes the JSON structure written to stdout
|
||||
# Note: stdout/stderr/exit_code are captured automatically by the execution system
|
||||
output_schema:
|
||||
type: object
|
||||
properties:
|
||||
downloaded_packs:
|
||||
type: array
|
||||
description: "List of successfully downloaded packs"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
source:
|
||||
type: string
|
||||
description: "Original pack source (URL or ref)"
|
||||
source_type:
|
||||
type: string
|
||||
description: "Type of source"
|
||||
enum:
|
||||
- git
|
||||
- http
|
||||
- registry
|
||||
pack_path:
|
||||
type: string
|
||||
description: "Local filesystem path to downloaded pack"
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference (from pack.yaml)"
|
||||
pack_version:
|
||||
type: string
|
||||
description: "Pack version (from pack.yaml)"
|
||||
git_commit:
|
||||
type: string
|
||||
description: "Git commit hash (for git sources)"
|
||||
checksum:
|
||||
type: string
|
||||
description: "Directory checksum"
|
||||
failed_packs:
|
||||
type: array
|
||||
description: "List of packs that failed to download"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
source:
|
||||
type: string
|
||||
description: "Pack source that failed"
|
||||
error:
|
||||
type: string
|
||||
description: "Error message"
|
||||
total_count:
|
||||
type: integer
|
||||
description: "Total number of packs requested"
|
||||
success_count:
|
||||
type: integer
|
||||
description: "Number of packs successfully downloaded"
|
||||
failure_count:
|
||||
type: integer
|
||||
description: "Number of packs that failed"
|
||||
downloaded_packs:
|
||||
type: array
|
||||
description: "List of successfully downloaded packs"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
source:
|
||||
type: string
|
||||
description: "Original pack source (URL or ref)"
|
||||
source_type:
|
||||
type: string
|
||||
description: "Type of source"
|
||||
enum:
|
||||
- git
|
||||
- http
|
||||
- registry
|
||||
pack_path:
|
||||
type: string
|
||||
description: "Local filesystem path to downloaded pack"
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference (from pack.yaml)"
|
||||
pack_version:
|
||||
type: string
|
||||
description: "Pack version (from pack.yaml)"
|
||||
git_commit:
|
||||
type: string
|
||||
description: "Git commit hash (for git sources)"
|
||||
checksum:
|
||||
type: string
|
||||
description: "Directory checksum"
|
||||
failed_packs:
|
||||
type: array
|
||||
description: "List of packs that failed to download"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
source:
|
||||
type: string
|
||||
description: "Pack source that failed"
|
||||
error:
|
||||
type: string
|
||||
description: "Error message"
|
||||
total_count:
|
||||
type: integer
|
||||
description: "Total number of packs requested"
|
||||
success_count:
|
||||
type: integer
|
||||
description: "Number of packs successfully downloaded"
|
||||
failure_count:
|
||||
type: integer
|
||||
description: "Number of packs that failed"
|
||||
|
||||
# Tags for categorization
|
||||
tags:
|
||||
|
||||
@@ -19,13 +19,11 @@ parameter_format: dotenv
|
||||
# Output format: text (no structured data parsing)
|
||||
output_format: text
|
||||
|
||||
# Action parameters schema (standard JSON Schema format)
|
||||
# Action parameters schema (StackStorm-style: inline required/secret per parameter)
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
description: "Message to echo (empty string if not provided)"
|
||||
message:
|
||||
type: string
|
||||
description: "Message to echo (empty string if not provided)"
|
||||
|
||||
# Output schema: not applicable for text output format
|
||||
# The action outputs plain text to stdout
|
||||
|
||||
@@ -15,124 +15,119 @@ parameter_format: dotenv
|
||||
# Output format: json (structured data parsing enabled)
|
||||
output_format: json
|
||||
|
||||
# Action parameters schema
|
||||
# Action parameters schema (StackStorm-style with inline required/secret)
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
pack_paths:
|
||||
type: array
|
||||
description: "List of pack directory paths to analyze"
|
||||
items:
|
||||
type: string
|
||||
minItems: 1
|
||||
skip_validation:
|
||||
type: boolean
|
||||
description: "Skip validation of pack.yaml schema"
|
||||
default: false
|
||||
api_url:
|
||||
pack_paths:
|
||||
type: array
|
||||
description: "List of pack directory paths to analyze"
|
||||
items:
|
||||
type: string
|
||||
description: "Attune API URL for checking installed packs"
|
||||
default: "http://localhost:8080"
|
||||
required:
|
||||
- pack_paths
|
||||
minItems: 1
|
||||
required: true
|
||||
skip_validation:
|
||||
type: boolean
|
||||
description: "Skip validation of pack.yaml schema"
|
||||
default: false
|
||||
api_url:
|
||||
type: string
|
||||
description: "Attune API URL for checking installed packs"
|
||||
default: "http://localhost:8080"
|
||||
|
||||
# Output schema: describes the JSON structure written to stdout
|
||||
# Note: stdout/stderr/exit_code are captured automatically by the execution system
|
||||
output_schema:
|
||||
type: object
|
||||
properties:
|
||||
dependencies:
|
||||
type: array
|
||||
description: "List of pack dependencies that need to be installed"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference (e.g., 'core', 'slack')"
|
||||
version_spec:
|
||||
type: string
|
||||
description: "Version specification (e.g., '>=1.0.0', '^2.1.0')"
|
||||
required_by:
|
||||
type: string
|
||||
description: "Pack that requires this dependency"
|
||||
already_installed:
|
||||
type: boolean
|
||||
description: "Whether this dependency is already installed"
|
||||
runtime_requirements:
|
||||
dependencies:
|
||||
type: array
|
||||
description: "List of pack dependencies that need to be installed"
|
||||
items:
|
||||
type: object
|
||||
description: "Runtime environment requirements by pack"
|
||||
additionalProperties:
|
||||
type: object
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
python:
|
||||
type: object
|
||||
description: "Python runtime requirements"
|
||||
properties:
|
||||
version:
|
||||
type: string
|
||||
description: "Python version requirement"
|
||||
requirements_file:
|
||||
type: string
|
||||
description: "Path to requirements.txt"
|
||||
nodejs:
|
||||
type: object
|
||||
description: "Node.js runtime requirements"
|
||||
properties:
|
||||
version:
|
||||
type: string
|
||||
description: "Node.js version requirement"
|
||||
package_file:
|
||||
type: string
|
||||
description: "Path to package.json"
|
||||
missing_dependencies:
|
||||
type: array
|
||||
description: "Pack dependencies that are not yet installed"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
version_spec:
|
||||
type: string
|
||||
description: "Version specification"
|
||||
required_by:
|
||||
type: string
|
||||
description: "Pack that requires this dependency"
|
||||
analyzed_packs:
|
||||
type: array
|
||||
description: "List of packs that were analyzed"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
pack_path:
|
||||
type: string
|
||||
description: "Path to pack directory"
|
||||
has_dependencies:
|
||||
type: boolean
|
||||
description: "Whether pack has dependencies"
|
||||
dependency_count:
|
||||
type: integer
|
||||
description: "Number of dependencies"
|
||||
errors:
|
||||
type: array
|
||||
description: "Errors encountered during analysis"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pack_path:
|
||||
type: string
|
||||
description: "Pack path where error occurred"
|
||||
error:
|
||||
type: string
|
||||
description: "Error message"
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference (e.g., 'core', 'slack')"
|
||||
version_spec:
|
||||
type: string
|
||||
description: "Version specification (e.g., '>=1.0.0', '^2.1.0')"
|
||||
required_by:
|
||||
type: string
|
||||
description: "Pack that requires this dependency"
|
||||
already_installed:
|
||||
type: boolean
|
||||
description: "Whether this dependency is already installed"
|
||||
runtime_requirements:
|
||||
type: object
|
||||
description: "Runtime environment requirements by pack"
|
||||
additionalProperties:
|
||||
type: object
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
python:
|
||||
type: object
|
||||
description: "Python runtime requirements"
|
||||
properties:
|
||||
version:
|
||||
type: string
|
||||
description: "Python version requirement"
|
||||
requirements_file:
|
||||
type: string
|
||||
description: "Path to requirements.txt"
|
||||
nodejs:
|
||||
type: object
|
||||
description: "Node.js runtime requirements"
|
||||
properties:
|
||||
version:
|
||||
type: string
|
||||
description: "Node.js version requirement"
|
||||
package_file:
|
||||
type: string
|
||||
description: "Path to package.json"
|
||||
missing_dependencies:
|
||||
type: array
|
||||
description: "Pack dependencies that are not yet installed"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
version_spec:
|
||||
type: string
|
||||
description: "Version specification"
|
||||
required_by:
|
||||
type: string
|
||||
description: "Pack that requires this dependency"
|
||||
analyzed_packs:
|
||||
type: array
|
||||
description: "List of packs that were analyzed"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
pack_path:
|
||||
type: string
|
||||
description: "Path to pack directory"
|
||||
has_dependencies:
|
||||
type: boolean
|
||||
description: "Whether pack has dependencies"
|
||||
dependency_count:
|
||||
type: integer
|
||||
description: "Number of dependencies"
|
||||
errors:
|
||||
type: array
|
||||
description: "Errors encountered during analysis"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pack_path:
|
||||
type: string
|
||||
description: "Pack path where error occurred"
|
||||
error:
|
||||
type: string
|
||||
description: "Error message"
|
||||
|
||||
# Tags for categorization
|
||||
tags:
|
||||
|
||||
@@ -20,107 +20,102 @@ parameter_format: dotenv
|
||||
# Output format: json (structured data parsing enabled)
|
||||
output_format: json
|
||||
|
||||
# Action parameters schema (standard JSON Schema format)
|
||||
# Action parameters schema (StackStorm-style with inline required/secret)
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
description: "URL to send the request to"
|
||||
method:
|
||||
type: string
|
||||
description: "HTTP method to use"
|
||||
default: "GET"
|
||||
enum:
|
||||
- GET
|
||||
- POST
|
||||
- PUT
|
||||
- PATCH
|
||||
- DELETE
|
||||
- HEAD
|
||||
- OPTIONS
|
||||
headers:
|
||||
type: object
|
||||
description: "HTTP headers to include in the request"
|
||||
default: {}
|
||||
body:
|
||||
type: string
|
||||
description: "Request body (for POST, PUT, PATCH methods)"
|
||||
json_body:
|
||||
type: object
|
||||
description: "JSON request body (alternative to body parameter)"
|
||||
query_params:
|
||||
type: object
|
||||
description: "URL query parameters as key-value pairs"
|
||||
default: {}
|
||||
timeout:
|
||||
type: integer
|
||||
description: "Request timeout in seconds"
|
||||
default: 30
|
||||
minimum: 1
|
||||
maximum: 300
|
||||
verify_ssl:
|
||||
type: boolean
|
||||
description: "Verify SSL certificates"
|
||||
default: true
|
||||
auth_type:
|
||||
type: string
|
||||
description: "Authentication type"
|
||||
enum:
|
||||
- none
|
||||
- basic
|
||||
- bearer
|
||||
auth_username:
|
||||
type: string
|
||||
description: "Username for basic authentication"
|
||||
auth_password:
|
||||
type: string
|
||||
description: "Password for basic authentication"
|
||||
secret: true
|
||||
auth_token:
|
||||
type: string
|
||||
description: "Bearer token for bearer authentication"
|
||||
secret: true
|
||||
follow_redirects:
|
||||
type: boolean
|
||||
description: "Follow HTTP redirects"
|
||||
default: true
|
||||
max_redirects:
|
||||
type: integer
|
||||
description: "Maximum number of redirects to follow"
|
||||
default: 10
|
||||
required:
|
||||
- url
|
||||
url:
|
||||
type: string
|
||||
description: "URL to send the request to"
|
||||
required: true
|
||||
method:
|
||||
type: string
|
||||
description: "HTTP method to use"
|
||||
default: "GET"
|
||||
enum:
|
||||
- GET
|
||||
- POST
|
||||
- PUT
|
||||
- PATCH
|
||||
- DELETE
|
||||
- HEAD
|
||||
- OPTIONS
|
||||
headers:
|
||||
type: object
|
||||
description: "HTTP headers to include in the request"
|
||||
default: {}
|
||||
body:
|
||||
type: string
|
||||
description: "Request body (for POST, PUT, PATCH methods)"
|
||||
json_body:
|
||||
type: object
|
||||
description: "JSON request body (alternative to body parameter)"
|
||||
query_params:
|
||||
type: object
|
||||
description: "URL query parameters as key-value pairs"
|
||||
default: {}
|
||||
timeout:
|
||||
type: integer
|
||||
description: "Request timeout in seconds"
|
||||
default: 30
|
||||
minimum: 1
|
||||
maximum: 300
|
||||
verify_ssl:
|
||||
type: boolean
|
||||
description: "Verify SSL certificates"
|
||||
default: true
|
||||
auth_type:
|
||||
type: string
|
||||
description: "Authentication type"
|
||||
enum:
|
||||
- none
|
||||
- basic
|
||||
- bearer
|
||||
auth_username:
|
||||
type: string
|
||||
description: "Username for basic authentication"
|
||||
auth_password:
|
||||
type: string
|
||||
description: "Password for basic authentication"
|
||||
secret: true
|
||||
auth_token:
|
||||
type: string
|
||||
description: "Bearer token for bearer authentication"
|
||||
secret: true
|
||||
follow_redirects:
|
||||
type: boolean
|
||||
description: "Follow HTTP redirects"
|
||||
default: true
|
||||
max_redirects:
|
||||
type: integer
|
||||
description: "Maximum number of redirects to follow"
|
||||
default: 10
|
||||
|
||||
# Output schema: describes the JSON structure written to stdout
|
||||
# Note: stdout/stderr/exit_code are captured automatically by the execution system
|
||||
output_schema:
|
||||
type: object
|
||||
properties:
|
||||
status_code:
|
||||
type: integer
|
||||
description: "HTTP status code"
|
||||
headers:
|
||||
type: object
|
||||
description: "Response headers"
|
||||
body:
|
||||
type: string
|
||||
description: "Response body as text"
|
||||
json:
|
||||
type: object
|
||||
description: "Parsed JSON response (if applicable, null otherwise)"
|
||||
elapsed_ms:
|
||||
type: integer
|
||||
description: "Request duration in milliseconds"
|
||||
url:
|
||||
type: string
|
||||
description: "Final URL after redirects"
|
||||
success:
|
||||
type: boolean
|
||||
description: "Whether the request was successful (2xx status code)"
|
||||
error:
|
||||
type: string
|
||||
description: "Error message if request failed (only present on failure)"
|
||||
status_code:
|
||||
type: integer
|
||||
description: "HTTP status code"
|
||||
headers:
|
||||
type: object
|
||||
description: "Response headers"
|
||||
body:
|
||||
type: string
|
||||
description: "Response body as text"
|
||||
json:
|
||||
type: object
|
||||
description: "Parsed JSON response (if applicable, null otherwise)"
|
||||
elapsed_ms:
|
||||
type: integer
|
||||
description: "Request duration in milliseconds"
|
||||
url:
|
||||
type: string
|
||||
description: "Final URL after redirects"
|
||||
success:
|
||||
type: boolean
|
||||
description: "Whether the request was successful (2xx status code)"
|
||||
error:
|
||||
type: string
|
||||
description: "Error message if request failed (only present on failure)"
|
||||
|
||||
# Tags for categorization
|
||||
tags:
|
||||
|
||||
@@ -19,19 +19,17 @@ parameter_format: dotenv
|
||||
# Output format: text (no structured data parsing)
|
||||
output_format: text
|
||||
|
||||
# Action parameters schema (standard JSON Schema format)
|
||||
# Action parameters schema (StackStorm-style inline format)
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
description: "Optional message to log (for debugging)"
|
||||
exit_code:
|
||||
type: integer
|
||||
description: "Exit code to return (default: 0 for success)"
|
||||
default: 0
|
||||
minimum: 0
|
||||
maximum: 255
|
||||
message:
|
||||
type: string
|
||||
description: "Optional message to log (for debugging)"
|
||||
exit_code:
|
||||
type: integer
|
||||
description: "Exit code to return (default: 0 for success)"
|
||||
default: 0
|
||||
minimum: 0
|
||||
maximum: 255
|
||||
|
||||
# Output schema: not applicable for text output format
|
||||
# The action outputs plain text to stdout
|
||||
|
||||
@@ -15,173 +15,168 @@ parameter_format: dotenv
|
||||
# Output format: json (structured data parsing enabled)
|
||||
output_format: json
|
||||
|
||||
# Action parameters schema
|
||||
# Action parameters schema (StackStorm-style with inline required/secret)
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
pack_paths:
|
||||
type: array
|
||||
description: "List of pack directory paths to register"
|
||||
items:
|
||||
type: string
|
||||
minItems: 1
|
||||
packs_base_dir:
|
||||
pack_paths:
|
||||
type: array
|
||||
description: "List of pack directory paths to register"
|
||||
items:
|
||||
type: string
|
||||
description: "Base directory where packs are permanently stored"
|
||||
default: "/opt/attune/packs"
|
||||
skip_validation:
|
||||
type: boolean
|
||||
description: "Skip schema validation of pack components"
|
||||
default: false
|
||||
skip_tests:
|
||||
type: boolean
|
||||
description: "Skip running pack tests before registration"
|
||||
default: false
|
||||
force:
|
||||
type: boolean
|
||||
description: "Force registration even if pack already exists (will replace)"
|
||||
default: false
|
||||
api_url:
|
||||
type: string
|
||||
description: "Attune API URL for registration calls"
|
||||
default: "http://localhost:8080"
|
||||
api_token:
|
||||
type: string
|
||||
description: "API authentication token"
|
||||
secret: true
|
||||
required:
|
||||
- pack_paths
|
||||
minItems: 1
|
||||
required: true
|
||||
packs_base_dir:
|
||||
type: string
|
||||
description: "Base directory where packs are permanently stored"
|
||||
default: "/opt/attune/packs"
|
||||
skip_validation:
|
||||
type: boolean
|
||||
description: "Skip schema validation of pack components"
|
||||
default: false
|
||||
skip_tests:
|
||||
type: boolean
|
||||
description: "Skip running pack tests before registration"
|
||||
default: false
|
||||
force:
|
||||
type: boolean
|
||||
description: "Force registration even if pack already exists (will replace)"
|
||||
default: false
|
||||
api_url:
|
||||
type: string
|
||||
description: "Attune API URL for registration calls"
|
||||
default: "http://localhost:8080"
|
||||
api_token:
|
||||
type: string
|
||||
description: "API authentication token"
|
||||
secret: true
|
||||
|
||||
# Output schema: describes the JSON structure written to stdout
|
||||
# Note: stdout/stderr/exit_code are captured automatically by the execution system
|
||||
output_schema:
|
||||
type: object
|
||||
properties:
|
||||
registered_packs:
|
||||
type: array
|
||||
description: "List of successfully registered packs"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
pack_id:
|
||||
type: integer
|
||||
description: "Database ID of registered pack"
|
||||
pack_version:
|
||||
type: string
|
||||
description: "Pack version"
|
||||
storage_path:
|
||||
type: string
|
||||
description: "Permanent storage path"
|
||||
components_registered:
|
||||
type: object
|
||||
description: "Count of registered components by type"
|
||||
properties:
|
||||
actions:
|
||||
type: integer
|
||||
description: "Number of actions registered"
|
||||
sensors:
|
||||
type: integer
|
||||
description: "Number of sensors registered"
|
||||
triggers:
|
||||
type: integer
|
||||
description: "Number of triggers registered"
|
||||
rules:
|
||||
type: integer
|
||||
description: "Number of rules registered"
|
||||
workflows:
|
||||
type: integer
|
||||
description: "Number of workflows registered"
|
||||
policies:
|
||||
type: integer
|
||||
description: "Number of policies registered"
|
||||
test_result:
|
||||
type: object
|
||||
description: "Pack test results (if tests were run)"
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
description: "Test status"
|
||||
enum:
|
||||
- passed
|
||||
- failed
|
||||
- skipped
|
||||
total_tests:
|
||||
type: integer
|
||||
description: "Total number of tests"
|
||||
passed:
|
||||
type: integer
|
||||
description: "Number of passed tests"
|
||||
failed:
|
||||
type: integer
|
||||
description: "Number of failed tests"
|
||||
validation_results:
|
||||
type: object
|
||||
description: "Component validation results"
|
||||
properties:
|
||||
valid:
|
||||
type: boolean
|
||||
description: "Whether all components are valid"
|
||||
errors:
|
||||
type: array
|
||||
description: "Validation errors found"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
component_type:
|
||||
type: string
|
||||
description: "Type of component"
|
||||
component_file:
|
||||
type: string
|
||||
description: "File with validation error"
|
||||
error:
|
||||
type: string
|
||||
description: "Error message"
|
||||
failed_packs:
|
||||
type: array
|
||||
description: "List of packs that failed to register"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
pack_path:
|
||||
type: string
|
||||
description: "Pack directory path"
|
||||
error:
|
||||
type: string
|
||||
description: "Error message"
|
||||
error_stage:
|
||||
type: string
|
||||
description: "Stage where error occurred"
|
||||
enum:
|
||||
- validation
|
||||
- testing
|
||||
- database_registration
|
||||
- file_copy
|
||||
- api_call
|
||||
summary:
|
||||
registered_packs:
|
||||
type: array
|
||||
description: "List of successfully registered packs"
|
||||
items:
|
||||
type: object
|
||||
description: "Summary of registration process"
|
||||
properties:
|
||||
total_packs:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
pack_id:
|
||||
type: integer
|
||||
description: "Total number of packs processed"
|
||||
success_count:
|
||||
type: integer
|
||||
description: "Number of successfully registered packs"
|
||||
failure_count:
|
||||
type: integer
|
||||
description: "Number of failed registrations"
|
||||
total_components:
|
||||
type: integer
|
||||
description: "Total number of components registered"
|
||||
duration_ms:
|
||||
type: integer
|
||||
description: "Total registration time in milliseconds"
|
||||
description: "Database ID of registered pack"
|
||||
pack_version:
|
||||
type: string
|
||||
description: "Pack version"
|
||||
storage_path:
|
||||
type: string
|
||||
description: "Permanent storage path"
|
||||
components_registered:
|
||||
type: object
|
||||
description: "Count of registered components by type"
|
||||
properties:
|
||||
actions:
|
||||
type: integer
|
||||
description: "Number of actions registered"
|
||||
sensors:
|
||||
type: integer
|
||||
description: "Number of sensors registered"
|
||||
triggers:
|
||||
type: integer
|
||||
description: "Number of triggers registered"
|
||||
rules:
|
||||
type: integer
|
||||
description: "Number of rules registered"
|
||||
workflows:
|
||||
type: integer
|
||||
description: "Number of workflows registered"
|
||||
policies:
|
||||
type: integer
|
||||
description: "Number of policies registered"
|
||||
test_result:
|
||||
type: object
|
||||
description: "Pack test results (if tests were run)"
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
description: "Test status"
|
||||
enum:
|
||||
- passed
|
||||
- failed
|
||||
- skipped
|
||||
total_tests:
|
||||
type: integer
|
||||
description: "Total number of tests"
|
||||
passed:
|
||||
type: integer
|
||||
description: "Number of passed tests"
|
||||
failed:
|
||||
type: integer
|
||||
description: "Number of failed tests"
|
||||
validation_results:
|
||||
type: object
|
||||
description: "Component validation results"
|
||||
properties:
|
||||
valid:
|
||||
type: boolean
|
||||
description: "Whether all components are valid"
|
||||
errors:
|
||||
type: array
|
||||
description: "Validation errors found"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
component_type:
|
||||
type: string
|
||||
description: "Type of component"
|
||||
component_file:
|
||||
type: string
|
||||
description: "File with validation error"
|
||||
error:
|
||||
type: string
|
||||
description: "Error message"
|
||||
failed_packs:
|
||||
type: array
|
||||
description: "List of packs that failed to register"
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
pack_ref:
|
||||
type: string
|
||||
description: "Pack reference"
|
||||
pack_path:
|
||||
type: string
|
||||
description: "Pack directory path"
|
||||
error:
|
||||
type: string
|
||||
description: "Error message"
|
||||
error_stage:
|
||||
type: string
|
||||
description: "Stage where error occurred"
|
||||
enum:
|
||||
- validation
|
||||
- testing
|
||||
- database_registration
|
||||
- file_copy
|
||||
- api_call
|
||||
summary:
|
||||
type: object
|
||||
description: "Summary of registration process"
|
||||
properties:
|
||||
total_packs:
|
||||
type: integer
|
||||
description: "Total number of packs processed"
|
||||
success_count:
|
||||
type: integer
|
||||
description: "Number of successfully registered packs"
|
||||
failure_count:
|
||||
type: integer
|
||||
description: "Number of failed registrations"
|
||||
total_components:
|
||||
type: integer
|
||||
description: "Total number of components registered"
|
||||
duration_ms:
|
||||
type: integer
|
||||
description: "Total registration time in milliseconds"
|
||||
|
||||
# Tags for categorization
|
||||
tags:
|
||||
|
||||
@@ -19,21 +19,18 @@ parameter_format: dotenv
|
||||
# Output format: text (no structured data parsing)
|
||||
output_format: text
|
||||
|
||||
# Action parameters schema (standard JSON Schema format)
|
||||
# Action parameters (StackStorm-style with inline required/secret)
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
seconds:
|
||||
type: integer
|
||||
description: "Number of seconds to sleep"
|
||||
default: 1
|
||||
minimum: 0
|
||||
maximum: 3600
|
||||
message:
|
||||
type: string
|
||||
description: "Optional message to display before sleeping"
|
||||
required:
|
||||
- seconds
|
||||
seconds:
|
||||
type: integer
|
||||
description: "Number of seconds to sleep"
|
||||
required: true
|
||||
default: 1
|
||||
minimum: 0
|
||||
maximum: 3600
|
||||
message:
|
||||
type: string
|
||||
description: "Optional message to display before sleeping"
|
||||
|
||||
# Output schema: not applicable for text output format
|
||||
# The action outputs plain text to stdout
|
||||
|
||||
Reference in New Issue
Block a user