Guides
Validate
Validate your extension for common errors before deploying to ensure compatibility with the Stackable platform. This checklist helps catch manifest issues, permission mismatches, and surface wiring problems that could cause runtime failures or marketplace rejection.
Tip — let the platform validate for you. The hosted Stackable MCP server exposes a
validate_manifesttool that runs the same server-side checks the marketplace submission flow uses. If your AI client is connected to the Stackable MCP server (see AI-Accelerated Development), just ask it to validatepackages/extension/public/manifest.jsonfor you — it returns structured errors and warnings without you having to walk the checklist below by hand. The manual steps remain useful for code-level checks the manifest validator can't see (permission usage, surface wiring, sandbox compliance).
1. Manifest validation
Read packages/extension/public/manifest.json and verify:
- [ ] Valid JSON
- [ ]
nameis a non-empty string - [ ]
versionfollows semver (e.g., "1.0.0") - [ ]
targetsis a non-empty array of valid target strings (slot.header, slot.content, slot.footer, slot.footer-links) - [ ]
permissionscontains only valid permission strings (context:read, data:query, data:fetch, actions:toast, actions:invoke, messaging:send, identity:extend, events:identity, events:messaging, events:activity) - [ ]
allowedDomainsis an array (can be empty if data:fetch is not used) - [ ] If
data:fetchpermission is declared,allowedDomainsis not empty
2. Permission-to-usage matching
Scan all .tsx files in packages/extension/src/ for capability usage:
capabilities.data.queryordata.query→ needsdata:querypermissioncapabilities.data.fetchordata.fetch→ needsdata:fetchpermissioncapabilities.context.readoruseContextData→ needscontext:readpermissioncapabilities.actions.toast→ needsactions:toastpermissioncapabilities.actions.invoke→ needsactions:invokepermissionuseExtendIdentityorcapabilities.identity.extend→ needsidentity:extendpermission AND every custom key returned by the handler / passed toextend(patch)MUST be declared inmanifest.identityClaims(standard JWT claimsexternal_id/email/nameare exempt). Undeclared keys are dropped by the host filter with aconsole.warn.useIdentityEvent→ needsevents:identitypermission (also check manifesteventsarray has matching entries)useMessagingEvent→ needsevents:messagingpermission (also check manifesteventsarray has matching entries)useActivityEvent→ needsevents:activitypermission (also check manifesteventsarray has matching entries)
Report:
- Missing permissions: capabilities used in code but not declared in manifest
- Unused permissions: permissions declared in manifest but not used in code
- Undeclared identityClaims: keys returned from
useExtendIdentityor passed tocapabilities.identity.extendthat are not inmanifest.identityClaims(excluding the standard-claim exemption list)
3. Surface-to-target matching
- Each
.tsxfile with a<Surface id="...">should have a matching target in manifest.json - Each target in manifest.json should have a corresponding Surface component
4. Import validation
Verify that:
- [ ] UI components are imported via
ui.*namespace from@stackable-labs/sdk-extension-react - [ ] No direct imports of
document,window.location, or other browser globals - [ ] No modifications to
packages/preview/directory - [ ] Entry point is
src/index.tsxusingcreateExtension
5. Summary
Print a summary: total issues found, categorized by severity (error vs warning). Errors must be fixed before deploying. Warnings are recommendations.
Next: deploy
Once validation passes, build the production bundle, host it, and register the Bundle URL with Stackable. See the Deploy guide.