Repository navigation
fix(setup): pull simulations by their single-type alias in the wizard - #92
Merged
Merged
Conversation
The wizard downloads the resources you pick one type at a time with pull.ts --type <type> --id ..., and a pull by --id accepts exactly one type. It passed the internal type name, but "simulations" is also the --type group alias for all four simulation types, so picking simulations failed with "Single-resource pull requires exactly one resource type" and stopped setup before simulations, suites and evals were downloaded. Non-interactive setup (npm run setup -- <org>) does one full pull and was unaffected. Move the --type alias maps and resolveResourceTypes out of config.ts into a config-free resource-type-args.ts, and add typeArgFor(), which spells a type so it resolves to exactly that type (simulations -> simulations/tests). The wizard's per-type pull uses it. A test pins that every resource type round-trips to itself, so a future collision with a group alias fails CI. Co-Authored-By: Claude Opus 5.5 <[email protected]>
scott-lowe-vapi
marked this pull request as ready for review
November 6, 2026 20:20
dhruva-vapi
approved these changes
Nov 6, 2026
Contributor
Author
Merge activity
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Value
V.A.L.U.E. tier: micro. It restores intended behavior in about 50 changed lines across 4 files, and a deterministic test proves it.
npm run setupwizard, choosing simulations fails with "Single-resource pull requires exactly one resource type". Setup stops before simulations, suites and evals are downloaded, and the org folder is left half set up. It happens to anyone whose org has simulations and who picks "All".npx create-vapi-app, which hands off to it. Non-interactive setup (npm run setup -- <org>) does one full pull and was never affected.How it works
The wizard pulls what you pick one type at a time:
pull.ts <org> --force --type <type> --id …. It passed the internal type name. Butsimulationsis also the--typegroup alias forpersonalities,scenarios,simulationsandsimulationSuites, and a pull by--idrefuses more than one type.src/resource-type-args.ts(new, config-free): the group and path alias maps andresolveResourceTypesmove here fromconfig.tsunchanged, so tests can import them.config.tsparses argv and exits on import, so tests couldn't. A newtypeArgFor(type)returns the--typespelling that resolves to exactly that type; forsimulationsthat'ssimulations/tests.src/setup.ts: the wizard's per-type pull passestypeArgFor(typeKey).tests/resource-type-args.test.ts: checks that every resource type comes back as exactly itself throughtypeArgFor, so a future type that collides with a group alias fails CI. It also checks that--type simulationsstill selects all four types forapply.Verification
Before: on
main, run the exact command the wizard builds against an org with simulations:After: run it with
typeArgFor("simulations"), which gives--type simulations/tests:The wizard's per-type pulls for
simulationSuitesandevalsalso completed, scoped to the requested ids. Your run had never reached them. These were read-only pulls against a real org, into a throwaway copy of the repo.npm run buildpasses, andnpm testpasses 584/584.Not in this PR
Each per-type pull in the wizard prints the
--forcewarning ("runnpm run pull(no flag) first…") and waits 2 seconds. For an org with all 9 types, that's 9 warnings and about 18 seconds of waiting, for advice aimed at hand-run--forcepulls. It could be a follow-up to suppress the warning for the wizard's own pulls.🤖 Generated with Claude Code