You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AutoSDK already detects create→poll→terminal patterns at the SDK level via --auto-detect-status-polling, generating <Method>WaitAsync companions. The CLI generator does not use this signal. Users have to chain shell commands:
JOB=$(firecrawl api crawling crawl-urls --request-json '{...}' | jq -r .id)
while true; do STATUS=$(firecrawl api crawling get-crawl-status --id "$JOB" | jq -r .status); [[ "$STATUS" == "completed" ]] && break; sleep 5; done
When EndPoint.PollingMetadata indicates this operation is the create side of a detected create→poll pair, emit three additional options:
--wait (Option<bool>, default false)
--poll-interval (Option<TimeSpan>, default 00:00:02) — parsed via CliRuntime.ParseDuration helper that accepts 2s/30m/1h/raw seconds.
--wait-timeout (Option<TimeSpan>, default 00:30:00) — same parser.
When --wait is set, the generated action calls the existing <Method>WaitAsync helper (already generated by the SDK side) instead of returning after create.
The wait helper already handles terminal state detection — CLI just consumes it.
Add CliRuntime.ParseDuration to the generated CliRuntime.cs template.
Vendor extension
x-cli-wait: true|false|always on an operation can force/suppress wait support when auto-detection misses or is wrong (e.g. operations with status-polling-shaped responses that aren't actually long-running).
Acceptance criteria
Firecrawl crawl, scrape (batch variant), extract, deep-research, llmstxt commands all accept --wait after regeneration.
Runway.Cli polling commands work via generated --wait without hand-written wrappers.
--poll-interval 250ms, --poll-interval 5s, --poll-interval 1h all parse correctly.
Without --wait, behavior is unchanged (returns the create response).
Part of #338.
Today
AutoSDK already detects create→poll→terminal patterns at the SDK level via
--auto-detect-status-polling, generating<Method>WaitAsynccompanions. The CLI generator does not use this signal. Users have to chain shell commands:Target
Proposed approach
EndPoint.PollingMetadataindicates this operation is the create side of a detected create→poll pair, emit three additional options:--wait(Option<bool>, default false)--poll-interval(Option<TimeSpan>, default00:00:02) — parsed viaCliRuntime.ParseDurationhelper that accepts2s/30m/1h/raw seconds.--wait-timeout(Option<TimeSpan>, default00:30:00) — same parser.--waitis set, the generated action calls the existing<Method>WaitAsynchelper (already generated by the SDK side) instead of returning after create.--jsonfor raw).CliRuntime.ParseDurationto the generatedCliRuntime.cstemplate.Vendor extension
x-cli-wait: true|false|alwayson an operation can force/suppress wait support when auto-detection misses or is wrong (e.g. operations with status-polling-shaped responses that aren't actually long-running).Acceptance criteria
crawl,scrape(batch variant),extract,deep-research,llmstxtcommands all accept--waitafter regeneration.--waitwithout hand-written wrappers.--poll-interval 250ms,--poll-interval 5s,--poll-interval 1hall parse correctly.--wait, behavior is unchanged (returns the create response).