Skip to content
Axiom/SDK
SDK / Permissions

Permissions

What a mod may do is decided in three places: what its manifest declares, what the person approved when they installed it, and what they decide while it runs. This page is what each one means for a mod author.

The manifest is the request

A mod imports only the capabilities its manifest names in capabilities.require. The host reads the binary's imports before it runs and refuses a module that imports anything undeclared, so the manifest is an exact list of what the mod can reach, and it is what the install prompt shows.

Declare what you use and nothing more. A capability declared and never imported is not refused, but it is reported as unused, and it is one more line on the prompt a person has to read.

Install is the approval

axiom install shows the whole graph before it changes anything: the mod and every dependency, each with its version, tier, capabilities and signing key, and any key this machine has not trusted before. The person approves that graph, and the approval is recorded for that mod in that game.

An update carries the approval over only if nothing grew:

  • no package is new to the graph,
  • no package became native,
  • no package asks for a capability it did not ask for before,
  • no package is signed by a different key.

Anything else is a new decision, shown with a sentence for each change. So an update that adds a capability will stop and ask; plan your capabilities so they do not grow in a patch release.

Capabilities that need a grant

Four capabilities are marked in the surface as needing an explicit grant: hook@1, fs.any@1, net@1, and the pack-only memory.write@1. They can do the most to a machine, so they are never automatic. No backend serves the three a mod can declare yet, and the prompt that would single them out is not built.

Refusals at run time

The host keeps a ledger of what the person decided about each mod, and its rules are built:

  • Refusals are remembered and grants are not. "Always deny" is written down and holds from then on. "Grant once" lasts the session and is never saved, and there is no "always allow". A standing grant can only come from an install decision, made with the whole graph in front of the person.
  • A refusal wins over a declaration. A mod sees the call refused and degrades exactly as it would if the capability were absent.
  • Undoing a refusal is done in the launcher's settings, never from inside the game.

The overlay's notice for it reads like this, and offers the decision rather than letting the mod look broken:

A mod was denied

It asked to read a file outside its own directory. It never declared fs.any, so the call returned an error and the mod carried on. Grant once, or Always deny.

Today a wasm mod cannot reach that point: an import it did not declare is refused when it loads, and none of the capabilities a grant covers is served yet. Write a mod as if it can, though. Treat every refused call as a real answer, degrade the way you would if the capability were absent, and do not ask again in a loop.

Prompts are the host's

No part of a permission prompt comes from a mod. A mod describes settings through a schema and the host decides what they become; nothing a mod draws can take focus, and a field a mod labels "Grant once" sets a config value and grants nothing.

Packs never see a mod's capabilities

memory.read@1, symbols@1 and memory.write@1 take addresses, so they are for packs only. They are absent from surface.h and from the import list a mod is checked against, and a mod that imports one is refused as Unknown.

Not built yet

  • The run-time prompt for the capabilities that need a grant, and standing grants from an install approval.
  • axiom caps, which will print each capability a mod negotiated and where it came from.