Workflow script dialect and loader transform are undocumented — no offline parse-check or test entry point
Workflow scripts accept export const meta (module syntax) + top-level return (function-body syntax) + top-level await in one file, so the loader demonstrably wraps/transforms scripts before execution — but the transform, the parser options, the definitive blocked-globals list, and any offline parse/dry-run entry point are all undocumented. node --check returns 0 on scripts the loader rejects, so a repo gate cannot pin against the loader's own parser.
We maintain a 1,678-line production workflow (plugin workflow, invoked via a slash command) and want to run it deterministically under pytest by stubbing agent() — the sandbox's own guarantees (no fs/clock/randomness) make scripts pure functions of their agent() returns, which is ideal for testing, but we have to reverse-engineer the wrapper to do it.
Ask:
- Document the script dialect and loader transform (parser, ecmaVersion/sourceType/allowReturnOutsideFunction or equivalent)
- Expose a parse-check or dry-run (CLI or library entry point) usable in CI
- Document the resume/journal replay mechanism for deterministic testing
- Document which globals are available/blocked and how (absent vs throwing vs shadowed)
🤖 Generated with Claude Code
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗