support PBB app feature types in manifest and prompts#165
Merged
Conversation
Fetch active types from /apps_ms/public/platform-building-blocks-schemas at runtime and merge with the static AppFeatureType enum so manifests can declare PBB-only types (incl. action-family blocks) without enum maintenance. Falls back to enum-only when the endpoint is unreachable. Co-authored-by: Cursor <cursoragent@cursor.com>
Shaharshaki2
approved these changes
May 10, 2026
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.
Summary
Currently
AppFeatureTypeis a hardcoded TypeScript enum used as the source-of-truth list of valid feature types in three places:ManifestFeatureSchema.type(z.nativeEnum) - rejects PBB-only types inapp-manifest.ymlchooseAppFeatureTypeinteractive prompt - never offers PBB typesapp-features:createvalidity check - sameThis PR makes the runtime set of valid types enum ∪ active PBB types by fetching
https://monday-apps-ms.monday.com/apps_ms/public/platform-building-blocks-schemas(same endpoint already consumed bymonday-mcp), filteringstatus === 'ACTIVE', and exposing the merged list viagetValidAppFeatureTypes().The static enum is intentionally unchanged - all existing typed references (
AppFeatureType.AppFeatureOauth,excludeTypes: AppFeatureType[], etc.) keep working. Manifestdatavalidation and manifest field shape are untouched - this PR only widens whattypestrings are accepted.What changed
src/services/pbb-schema-manager.ts- singleton, in-memory 2h cache, single in-flight promise, 5s timeout. Network failures are logged at debug level and the manager returns an empty list, so the CLI degrades to enum-only validation when offline.src/services/app-feature-types-service.ts-getValidAppFeatureTypes()returns the deduped union.platformBuildingBlocksSchemasUrl()insrc/consts/urls.ts.ManifestFeatureSchema.typefromz.nativeEnum(AppFeatureType)to az.string().refine(...)against the runtime list.readManifestFileis nowasyncandawaitspbbSchemaManager.initialize()before parse. Three callers updated:apps-service.cloneAppTemplateAndLoadManifest,app/deploy.ts, and the manifest-service test.chooseAppFeatureTypeinitialises the manager and lists merged types; param widened toArray<AppFeatureType | string>.app-features:createvalidity check uses the merged list (still rejectsAppFeatureOauth).Backwards compatibility
Test plan
npm run buildcleannpm run lintclean (0 new errors; 23 pre-existing warnings unchanged)npx jest43/43 passing, includingapp:createintegration test that exercisescloneAppTemplateAndLoadManifest -> readManifestFile -> feature creationmapps app:createfrom a manifest using a PBB-only type (e.g.AppFeatureMenuItem,AppFeatureSkill,AppFeatureAiTeammate) imports successfullymapps app-features:createinteractive prompt lists PBB types alongside enum entrieshttps://monday.monday.com/boards/3670992828/pulses/11970753969
Made with Cursor