feat: rename the permissions platform concept to capabilities - #18
Merged
Conversation
constructive-db renamed the permissions platform surface to capabilities because the same bitstring now carries trust-ladder levels as well as permissions. Follow the renamed API surface (appCapabilities, OrgCapability, capabilityId, *_capabilities tables) and rename the policy field widget to capability-select. Individual capability names (admin_members, create_entity) keep their values; admin_permissions becomes admin_capabilities to match the platform catalog. Policy AST parameter keys stay named permission until node-type-registry publishes the new levels/capabilities parameter shape.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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
constructive-dbrenamed thepermissionsplatform concept tocapabilities(the same bitstring now also carries trust-ladder levels, so "permissions" no longer describes it). This repo consumes that surface in three places, all of which move:@constructive-io/data—POLICY_PROVISIONING_CONFIGemittedcomponent: 'permission-select'/label: 'Required Permission'. Renamed tocapability-select/Required Capability. This is the piecedashboardneeds published: its parity test compares its own policy UI config against this package, so the two must agree.@constructive-io/schema-builder— the widget's implementation (dynamic-form-field.tsx,policy-hooks.ts,policy-types.ts) plususe-permissions.ts→use-capabilities.ts, which queries the renamedappCapabilities/orgCapabilities.apps/blocksconsole-kit adapters and feature packs — these query the platform directly and were the largest share of the diff:OrgPermission→OrgCapability,orgProfilePermissions→orgProfileCapabilities,permissionId→capabilityId, and so on.What is deliberately not renamed
Policy AST parameter keys stay
permission. The publishednode-type-registry@1.14.3still exposes the old parameter shape, so the key a policy is provisioned with cannot change ahead of that publish:constructive-dbhas already changed this tolevels: string[]/capabilities: string[]in its workspace copy, so these keys flip in a follow-up once the registry is published — a separate change, because stored policy JSON carries the old key.Individual capability names keep their values (
admin_members,create_invites,create_entity) — only the concept is renamed, not the catalog entries. One exception, matching the platform:admin_permissions→admin_capabilities, whichconstructive-dbrenamed ininitialize_capabilities.sql.permission_only→capability_onlylikewise follows the platform, which renamed that storedinvite_profile_assignment_modevalue.DataPermissionsFieldis untouched; it kept its name through the platform rename.Generated artifacts
packages/schema-builder/registry.jsonwas regenerated viabuild:registryrather than hand-edited. Thefeature-pack.jsonsidecars were updated to match the typed catalog, whichapps/blocks/src/feature-packs/catalog.test.tsasserts byte-for-byte.Verification
pnpm checkpasses end-to-end:build:packages,lint:scripts,check:generated,check:selections,lint:types(6 projects), andtest(7 projects, 1400+ tests).Link to Devin session: https://app.devin.ai/sessions/8f89acc9280e4cef880921d966e0e8fc
Requested by: @pyramation