Until now, source workflow caches only refreshed on server boot or as a
side effect of submitting a run. That left users guessing whether a
fresh push had landed when `source view` showed stale workflows.
The new sync command makes it explicit:
- `scripthut source sync <name>` re-clones a git source (or re-globs a
path source over SSH), then refreshes the workflow cache. A failure
exits 2 so scripts can react.
- `scripthut source sync` (no name) does the same for every configured
source. Per-source failures are reported in the output but don't fail
the overall command — otherwise one broken source on a server would
poison the batch.
Server side: new POST /api/v1/sources/{name}/sync and POST
/api/v1/sources/sync endpoints. Sync errors surface in-band as a 200
response with an `error` field set, not as a 5xx; only "source not
found" or "config not loaded" produce 4xx/5xx. The handler shares its
core with the existing in-process sync background task via a
lazy-imported helper to avoid the api.py ↔ main.py circular dep.
LocalClient raises a clear "use --server" error — same degradation
pattern as run_source_workflow, since local CLI mode has no source
manager.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>