Skip to content

docs: Document the AURA wait_for orchestration worker tool - #41

Open
promptless[bot] wants to merge 7 commits into
mainfrom
promptless/aura-wait-for-tool
Open

docs: Document the AURA wait_for orchestration worker tool#41
promptless[bot] wants to merge 7 commits into
mainfrom
promptless/aura-wait-for-tool

Conversation

@promptless

@promptless promptless Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Open this suggestion in Promptless to view citations and reasoning process

AURA added wait_for, a built-in orchestration worker tool that polls an MCP tool until a caller-supplied condition holds, instead of having a worker sleep for a blind fixed duration or spend model turns on a manual check-and-sleep loop. This adds a new reference page under the AURA docs covering what the tool is, its call arguments (probe, until with matches / not_matches / quiet_for_sec, poll_sec, and max_wait_sec), the return value and stop reasons (matched, settled, timeout), the 300-second hard ceiling and other limits, the pre-call validation errors, and the observability attributes. It also adds wait_for to the streaming API guide's tool-coverage list and extends the Vale vocabulary.

The page is now wired into docs.json navigation under AURA → Features, alongside the streaming API guide, so it appears in the docs sidebar.

The Return Value content now lives as a subsection under Observability, since the return value is runtime output the worker inspects rather than a user-configurable input. It is summarized (scannable field table plus the reason values) and notes which fields correspond to the emitted span attributes (poll_count/samples, stop_reason/reason, elapsed_ms/elapsed_sec).

Files touched: aura/wait-for.mdx (new), aura/streaming-api-guide.mdx, docs.json, vale/styles/config/vocabularies/Mintlify/accept.txt.

Review feedback (Greg Janco, 2026-07-30)

  • "Please summarize this and move this under observability as this is not something that can be changed by the user." — Applied. Removed the standalone ## Return Value section (and its ### Stop Reasons subsection) from the tool-call/configuration flow, summarized it, and relocated it as a ### Return Value subsection under ## Observability. The ### Wait Conditions (until) block was intentionally left in place under ## Tool Call Arguments, since it is a caller-controlled argument rather than runtime output.

Trigger Events


Tip: Add or adjust Promptless's style guide in Agent Knowledge Base ✍️

Add a reference page for wait_for, the native orchestration worker
tool that polls an MCP tool until a caller-supplied condition holds
instead of sleeping for a blind fixed duration. Cover the call
arguments, wait conditions, return value, stop reasons, limits, and
observability. Also add wait_for to the streaming API guide's
tool-coverage list and extend the Vale vocabulary.

The page is authored but intentionally left out of docs.json
navigation so the client controls when it appears in the sidebar.

Relates to: mezmo/aura PR #449
Comment thread aura/wait-for.mdx
description: "A native orchestration worker tool that polls an MCP tool until a condition holds, instead of sleeping for a blind fixed duration."
---

`wait_for` is a built-in tool that AURA attaches to every orchestration worker whenever a shared Model Context Protocol (MCP) manager is available. This holds across all six supported LLM providers. It is not user-configurable: there is no TOML setting to enable or disable it. It belongs to the same native worker toolset as `submit_result` and `read_artifact`. The worker (the model) calls it, not a human.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirms wait_for is only attached (via wait_for_tools() closure) when shared_mcp is Some, and is wired identically for all six LlmConfig provider arms (OpenAI L2508, Anthropic L2541, Bedrock L2582, Gemini L2612, Ollama L2641, OpenRouter L2674) with no TOML gate — matches "attaches to every orchestration worker whenever a shared MCP manager is available... not user-configurable" and "all six supported LLM providers."

Source: https://github.com/mezmo/aura/blob/bf09e65e1b13c230680149596a9185eb6f760d36/crates/aura/src/orchestration/orchestrator.rs#L2453

Comment thread aura/wait-for.mdx
description: "A native orchestration worker tool that polls an MCP tool until a condition holds, instead of sleeping for a blind fixed duration."
---

`wait_for` is a built-in tool that AURA attaches to every orchestration worker whenever a shared Model Context Protocol (MCP) manager is available. This holds across all six supported LLM providers. It is not user-configurable: there is no TOML setting to enable or disable it. It belongs to the same native worker toolset as `submit_result` and `read_artifact`. The worker (the model) calls it, not a human.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait_for, submit_result, and read_artifact are declared as sibling modules in the same orchestration/tools module, supporting the claim that wait_for "belongs to the same native worker toolset as submit_result and read_artifact."

Source: https://github.com/mezmo/aura/blob/bf09e65e1b13c230680149596a9185eb6f760d36/crates/aura/src/orchestration/tools/mod.rs#L10-L13

Comment thread aura/wait-for.mdx

## How It Works

The worker supplies a `probe` (an MCP tool plus its arguments) and an `until` condition. AURA re-runs the probe every `poll_sec` seconds until the condition holds or the time bound elapses, then returns a structured result. The probe must be an MCP-provided tool. Native built-in tools cannot be probed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

McpProbeDispatcher::resolve only scans McpManager's streamable/sse/stdio tool maps, then dispatches via execute_mcp_tool — confirms "the probe must be an MCP-provided tool. Native built-in tools cannot be probed."

Source: https://github.com/mezmo/aura/blob/bf09e65e1b13c230680149596a9185eb6f760d36/crates/aura/src/orchestration/tools/wait_for.rs#L485-L514

Comment thread aura/wait-for.mdx Outdated

Pass these arguments in the `wait_for` tool call:

| Argument | Type | Required | Default | Description |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirms argument shape/required-ness and defaults: probe/until required, poll_sec optional default POLL_DEFAULT_SECS=2, max_wait_sec optional default MAX_WAIT_DEFAULT_SECS=120.

Source: https://github.com/mezmo/aura/blob/bf09e65e1b13c230680149596a9185eb6f760d36/crates/aura/src/orchestration/tools/wait_for.rs#L16-L40

Comment thread aura/wait-for.mdx Outdated

Supply exactly one of these keys:

| Key | Type | Stops When |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UntilSpec enum (Matches/NotMatches/QuietForSec) confirms the three mutually-exclusive until keys and their stop semantics, cross-checked against ConditionEvaluator::observe (wait_for.rs:344-371).

Source: https://github.com/mezmo/aura/blob/bf09e65e1b13c230680149596a9185eb6f760d36/crates/aura/src/orchestration/tools/wait_for.rs#L53-L57

Comment thread aura/wait-for.mdx Outdated

`wait_for` returns a structured result:

| Field | Type | Description |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WaitForOutput struct fields (reason, last_observation, elapsed_sec, samples, effective_max_wait_sec) exactly match the documented Return Value table.

Source: https://github.com/mezmo/aura/blob/bf09e65e1b13c230680149596a9185eb6f760d36/crates/aura/src/orchestration/tools/wait_for.rs#L399-L406

Comment thread aura/wait-for.mdx
"samples": 10,
"effective_max_wait_sec": 180
}
```

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StopReason enum (Matched/Settled/Timeout) with doc comments matches the Stop Reasons table exactly.

Source: https://github.com/mezmo/aura/blob/bf09e65e1b13c230680149596a9185eb6f760d36/crates/aura/src/orchestration/tools/wait_for.rs#L378-L397

Comment thread aura/wait-for.mdx Outdated

| Reason | Meaning |
| --- | --- |
| `matched` | A `matches` or `not_matches` predicate held. |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timeout is produced via the Ok((StopReason::Timeout, observation, samples)) branch, not an Err path — confirms "a timeout is a normal result, not an error" and that it carries last_observation.

Source: https://github.com/mezmo/aura/blob/bf09e65e1b13c230680149596a9185eb6f760d36/crates/aura/src/orchestration/tools/wait_for.rs#L604-L613

Comment thread aura/wait-for.mdx Outdated
## Limits and Validation

### Limits

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WaitBound::from_secs clamps via secs.min(MAX_WAIT_HARD_CEILING_SECS) (300, defined at line 16); effective_max_wait_sec later reports call.budget().bound().as_secs(), i.e. the clamped value. Confirms the hard-ceiling clamp warning.

Source: https://github.com/mezmo/aura/blob/bf09e65e1b13c230680149596a9185eb6f760d36/crates/aura/src/orchestration/tools/wait_for.rs#L203-L217

Comment thread aura/wait-for.mdx Outdated

These runtime bounds apply while a `wait_for` call is running:

<Warning>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each sample is wrapped in tokio::time::timeout(remaining, ...) against the shrinking remaining budget, so a hanging probe cannot outrun the bound — confirmed further by test hanging_probe_cannot_outrun_the_bound (wait_for.rs:1195-1212).

Source: https://github.com/mezmo/aura/blob/bf09e65e1b13c230680149596a9185eb6f760d36/crates/aura/src/orchestration/tools/wait_for.rs#L584-L613

Comment thread aura/wait-for.mdx Outdated
These runtime bounds apply while a `wait_for` call is running:

<Warning>
AURA clamps `max_wait_sec` to a hard ceiling of 300 seconds and silently reduces larger values. The enforced value is reported as `effective_max_wait_sec` in the Return Value.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAX_OBSERVATION_BYTES = 256 * 1024 (line 25); the length check happens mid-loop after each successful sample, raising WaitForError::ObservationTooLarge — a runtime error distinct from the pre-call WaitForCallError validation variants (lines 412-434).

Source: https://github.com/mezmo/aura/blob/bf09e65e1b13c230680149596a9185eb6f760d36/crates/aura/src/orchestration/tools/wait_for.rs#L618-L625

Comment thread aura/wait-for.mdx Outdated
</Warning>

If a wait legitimately needs longer than the 300-second ceiling, the worker can issue another `wait_for` call after a `timeout` result.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WaitForCallError enum lists exactly the six pre-call validation problems documented: EmptyProbeTool, ProbeArgsNotObject, InvalidPattern, Zero{Quiet,Poll,Wait}, PollExceedsBound (poll_sec >= max_wait_sec), QuietWindowExceedsBound (quiet_for_sec > max_wait_sec); enforced in WaitForCall::parse (lines 267-296) and covered by parse_rejects_every_invalid_call test (lines 1073-1155).

Source: https://github.com/mezmo/aura/blob/bf09e65e1b13c230680149596a9185eb6f760d36/crates/aura/src/orchestration/tools/wait_for.rs#L412-L434

Comment thread aura/wait-for.mdx Outdated
Before the call runs, AURA returns the following pre-call validation problems as call errors:

- An empty probe tool name.
- `args` that is not an object.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tracing::info_span! "orchestration.wait_for" declares orchestration.probe_tool, orchestration.wait_condition, orchestration.poll_count, orchestration.stop_reason, orchestration.elapsed_ms fields, populated at lines 568-572 and 638-641 — confirms the Observability section's field list.

Source: https://github.com/mezmo/aura/blob/bf09e65e1b13c230680149596a9185eb6f760d36/crates/aura/src/orchestration/tools/wait_for.rs#L753-L762

Comment thread aura/wait-for.mdx Outdated
- An empty probe tool name.
- `args` that is not an object.
- An invalid regular expression.
- A zero `poll_sec`, `quiet_for_sec`, or `max_wait_sec`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified target page exists in this docs repo (aura/streaming-api-guide.mdx) and documents the aura.* SSE tool-call event reference, including tool coverage for orchestration operations (read_artifact, submit_result, list_prior_runs) at line 685 — consistent with the wait_for page's cross-link and native-toolset framing.

Source: https://docs.mezmo.com/aura/streaming-api-guide

Comment thread aura/wait-for.mdx
- `poll_sec` greater than or equal to `max_wait_sec`.
- `quiet_for_sec` greater than `max_wait_sec`.

## Observability

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified anchor: aura/configuration-reference.mdx line 554 has heading "## [orchestration]" (Mintlify slug "orchestration"), and line 636 documents the worker-level mcp_filter field referenced by the See Also blurb.

Source: https://docs.mezmo.com/aura/configuration-reference#orchestration

@mintlify

mintlify Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mezmo-docs 🟢 Ready View Preview Jul 28, 2026, 9:43 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Wire aura/wait-for.mdx into the AURA > Features group in docs.json so
the wait_for orchestration worker tool reference appears in the sidebar.

Relates to: PR #41
…for-tool

# Conflicts:
#	vale/styles/config/vocabularies/Mintlify/accept.txt
Summarize the return value and relocate it beneath Observability, since it
is runtime output the worker inspects rather than a user-configurable input.
Applies reviewer feedback from Greg Janco on suggestion 7d40c8e7.

Relates to: PR #41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants