…unner)
Add a shared, parallel spector scenario compiler in the new
@azure-tools/spector-runner package, plus a wrapper-free CLI with a
declarative spector.config.yaml (specsRoot/outputDir/compileConfig +
postCompile/postCompileDeclarations hooks, selectable via
--phase all|compile|declarations) and a defineConfig module mode for
emitters needing more. Move the Go, TypeScript and Python regenerators
onto this one parallel-compile + reporting + lifecycle engine; output is
byte-identical to the previous per-emitter drivers.
Fixes Azure#5022
Fixes #5022
Summary
Adds a shared, parallel spector scenario compiler in the new
@azure-tools/spector-runnerpackage, and moves the Go, TypeScript and Python regenerators onto it.compileScenariosspawns onetsp compilesubprocess per scenario (up to N at a time, N = CPU count by default) and reports progress through aTaskRunner/runWithConcurrency/=== Summary ===engine shared in spirit with@typespec/tsp-integration, so the two can be merged later.Two driving modes
spector.config.yaml— the config can declare the output layout (specsRoot,outputDir,compileConfig) and per-instance lifecycle hooks (hooks.postCompile,hooks.postCompileDeclarations) as shell commands, selectable with--phase all|compile|declarations. Hook commands receiveSPECTOR_OUTPUT_DIR/SPECTOR_SPEC_PATH/SPECTOR_SPEC_NAME/SPECTOR_PHASE. This lets the TypeScript regenerator drop its bespoke driver/config JS entirely —pnpm generate-tsp-onlyis now justspector-runner --config spector.config.yaml, with two short hook scripts (client post-processing + api-extractor declarations).defineConfigmodule (--config-file) — for emitters needing extra spec roots, local specs, or cross-cuttingpreRun/postScenario/postRunsteps (Python keeps its upstream-synced option tables + flavor/baseline setup here).Emitters migrated
--config-filemodule.Notes
@azure-tools/spector-runnerpackage (54 unit tests).pnpm-lock.yamlchange is the newpicocolorsdep for the package.