How capabilities work
A capability names a native interface the package uses. List them in the manifest's capabilities array, each once; an unknown or repeated string makes the manifest invalid. A catalog entry must list exactly the same set as the package's manifest.
Capabilities never replace native permission. Each call is still checked against the actor, the session or binding, and the current native permission. Declare only what the package needs: administrators read the list to decide whether to trust it.
Identity and discovery
| Capability | Unlocks |
|---|---|
native.actor.read |
CurrentActor: the signed-in actor's ID, username and site administrator flag |
native.repositories.owned.search |
SearchOwnedRepositories: paged search of repositories the actor owns |
native.organization.ownership |
OrganizationOwner: whether the actor owns a given organization |
native.user.public_keys.read |
PublicSSHKeys: the actor's public SSH keys |
Repository data
| Capability | Unlocks |
|---|---|
native.repository.read |
Repository metadata and code-reader reads: the readable repository list, issues, pull requests, comments, reviews, review threads, checks, source, pull request files and commits, action capability facts, and the preparation snapshots for changes made for the signed-in person |
native.repository.issues.read |
Issue metadata, issue lists and issue preparation snapshots with only Issues read access, for repository pages with issues permission; grants no code, pull request or check access |
Changes for the signed-in person
Each capability covers the Submit, Get and Cancel methods for one kind of change; see Background collaboration.
| Capability | Unlocks |
|---|---|
native.repository.comments.write |
Comments on issues and pull requests |
native.repository.discussions.edit |
Title and description edits on issues and pull requests |
native.repository.discussions.state |
Closing and reopening issues and pull requests |
native.repository.discussions.lock |
Locking and unlocking conversations |
native.repository.issues.create |
Creating issues |
native.repository.pulls.create |
Creating pull requests |
native.repository.reviews.write |
Reviews, inline review comments, resolving review threads and requesting reviewers |
native.repository.merges.write |
Merging pull requests and marking them as manually merged |
Background and service access
| Capability | Unlocks |
|---|---|
native.background.operations |
A background client after startup: native snapshots and conditional operations under administrator-enrolled bindings |
native.repository.issues.intake |
Bounded issue intake grants for one submitted request, carrying no Git, pull request or deployment authority; used with background operations |
native.service.bridge |
Background admission for a separate service process through the shared service callback socket. The forge refuses to start the package unless SERVICE_CALLBACK_PATH is configured, and admits only peers mapped in SERVICE_BRIDGE_PEERS |
native.repository.runtime.control |
Reading and selecting a repository's runtime controller, and authorizing and granting runtime operations through it |
Host integration
| Capability | Unlocks |
|---|---|
native.contribution.authorize |
Consulting the backend's authorizer before showing a page, mounting a panel and forwarding each API request. The backend must register AuthorizeContribution, and must not register it without this capability |
native.extension.lifecycle |
Acting as a lifecycle controller for packages that name this package in lifecycle_controller. The backend must register a Lifecycle handler, and must not register one without this capability |
Policies
Policies are declared in the manifest's policies array, not in capabilities.
| Policy | Meaning |
|---|---|
forgejo.username |
The backend decides whether a personal account may be created or renamed to a given username. Consulted only for required packages; see Required packages |
Related reference
- Package layout and manifest for the full manifest fields.
- Extension backend for the native read client.
- Verified extension catalog for how catalog entries list capabilities.