mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-10-24 12:07:58 +09:00
Core walkthroughs author single-condition steps with `signal:`, `check:` or `route:` directly on the step -- 24 sites in frontend/src/data/walkthroughs.js do it -- and the frontend registry's completionFor() has always desugared them. The backend validator did not: `_STEP_FIELDS` rejected all three, so an extension that copied the pattern passed `new-extension --validate` and was then refused at install with an "unsupported fields" error. Teach the backend the same shorthand rather than take it away from core. `_completion_for()` mirrors completionFor() exactly (an explicit `completion` block still wins) and returns which spelling supplied the value, so problems are reported against the key the author wrote -- `steps[0].signal`, not `steps[0].completion.signal`. The shorthand is a spelling, not an escape hatch: the same token regexes and length bounds apply either way. The published schema gains the three properties so the contract, the validator and the frontend now agree. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>