Circuit DevelopmentFunction Primatives
Sleep
Pass-through no-op step using the `circuit.core.sleep` primitive
Introduction to Sleep
The circuit.core.sleep primitive is a pass-through (no-op) step. It accepts a numeric value as input and simply passes its configured outputs through to the circuit's memory without performing any transformation or external work. Use it when you need a placeholder step, a timing/await point, or a step that only forwards data.
Step Syntax
{
"name": "<step_name>",
"description": "Optional description",
"function": "circuit.core.sleep",
"input": {
"value": 123
},
"outputs": [
{
"name": "<output_name>",
"description": "Optional description",
"value": "${{ ... }}"
}
]
}Step Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | A unique identifier for this step. |
description | string | Yes | A description of the step's purpose. |
function | string | Yes | Must be "circuit.core.sleep". |
input | object | Yes | The input object (see below). |
outputs | array | Yes | One or more output declarations (see below). |
Input Fields
| Field | Type | Required | Description |
|---|---|---|---|
value | number | Yes | The numeric value to sleep for. No additional properties are allowed. |
Output Fields
Each entry in the outputs array:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The output variable name. |
description | string | Yes | A description of the output. |
value | string | Yes | A selector or literal value for the output. |
default_value | any | No | A default value used if the output value is unavailable. |
Behavior
circuit.core.sleep is a no-op: it does not call any external service or transform data. The step passes its configured outputs through to the circuit's memory, making it useful as a placeholder, a timing/await point, or a step that only forwards values to later steps.
Example
{
"name": "wait_step",
"description": "A no-op pass-through step",
"function": "circuit.core.sleep",
"input": {
"value": 100
},
"outputs": [
{
"name": "elapsed",
"description": "The value passed through",
"value": "${{ input.value }}"
}
]
}You can then reference the output in a later step:
{
"name": "final_output",
"value": "${{ steps.wait_step.output.outputs.elapsed }}"
}