documenting action spec
This commit is contained in:
58
packs/examples/actions/list_example.yaml
Normal file
58
packs/examples/actions/list_example.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
# List Example Action
|
||||
# Demonstrates JSON Lines output format for streaming results
|
||||
|
||||
ref: examples.list_example
|
||||
label: "List Example"
|
||||
description: "Example action that outputs multiple JSON objects as JSON Lines"
|
||||
enabled: true
|
||||
|
||||
# Runner type determines how the action is executed
|
||||
runner_type: shell
|
||||
|
||||
# Entry point is the shell script to execute
|
||||
entry_point: list_example.sh
|
||||
|
||||
# Parameter delivery: stdin for secure parameter passing
|
||||
parameter_delivery: stdin
|
||||
parameter_format: json
|
||||
|
||||
# Output format: jsonl (each line is a JSON object, collected into array)
|
||||
output_format: jsonl
|
||||
|
||||
# Action parameters schema (standard JSON Schema format)
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
count:
|
||||
type: integer
|
||||
description: "Number of items to generate"
|
||||
default: 5
|
||||
minimum: 1
|
||||
maximum: 100
|
||||
|
||||
# Output schema: array of objects (required for jsonl format)
|
||||
# Each line in stdout will be parsed as JSON and collected into this array
|
||||
output_schema:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: "Item identifier"
|
||||
value:
|
||||
type: string
|
||||
description: "Item value"
|
||||
timestamp:
|
||||
type: string
|
||||
description: "ISO 8601 timestamp"
|
||||
required:
|
||||
- id
|
||||
- value
|
||||
|
||||
# Tags for categorization
|
||||
tags:
|
||||
- utility
|
||||
- example
|
||||
- jsonl
|
||||
- streaming
|
||||
Reference in New Issue
Block a user