docs / Permissions
declare

Permissions

Each one is a sentence people read before they add your app — and a switch they can turn off later.

9 permissionsdeclared in manifest.json

The nine

PermissionWhat it gives youPeople see
page.textEverything visible on the page, as text.“Reads the text on this page”
page.selectionOnly what the person highlights.“Reads the text you select”
pageThe live DOM — rewrite, restyle, animate, observe.“Changes this page freely”
storagePrivate JSON and files for this person and this app, on their account — anything they share by link, and stickers you give them.“Remembers what you save”
pubValues other people using this app can read back — and rooms they edit together, live.“Saves values other people using this app can see”
clipboardPaste what they copied — Fave1 asks them every time — and copy outside a tap.“Copies and pastes — always asks before pasting”
aiAsk an AI model or give your app a voice — runs on Fave1 AI, paid from their Fave1 credits, never yours.“Uses AI — Fave1 AI, on your Fave1 credits”
cameraLive video from their camera while your app is open — Fave1 asks them first, shows a red dot, and keeps it on their page.“Uses your camera — asks first, never saved by Fave1”
micLive sound from their microphone while your app is open — Fave1 asks them first, shows a red dot, and keeps it on their page.“Uses your microphone — asks first, never saved by Fave1”

Nine sentences open fourteen members of ctx. storage covers ctx.storage, ctx.files, ctx.shared, ctx.stickers and ctx.purchases — the person’s own data, their files, what they share by link, the stickers you give them, and what they buy from you. pub covers ctx.pub and ctx.live — what other people using your app can see, on a board or in a room. ai covers ctx.ai — Fave1 AI on the person’s Fave1 credits, text and voice. camera covers ctx.camera and mic covers ctx.mic — two switches, so an app that shows a face can’t listen. One sentence, one switch, each. A permission that isn’t on this list fails the upload with its name. ctx.notify isn’t on it because it has nothing to declare — Fave1 asks the person the first time your app sends a reminder, and its switch is in Settings › Notifications.

When one is off

Every permission is a switch in Fave1 settings, per app. Flip one off and your app keeps opening — that part of ctx just stops answering. Handling it is your job, and review checks it: an app that crashes with one switch off gets sent back.

src/index.ts
if (!ctx.can('storage')) {
  // Signed out also reads as off — don't send them to a switch they can't see.
  ctx.ui.render(ctx.user.signedIn
    ? [
        ctx.ui.text('Saving is switched off for this app.'),
        ctx.ui.button('Open settings', { onClick: () => ctx.perms.open() }),
      ]
    : [ctx.ui.text('Sign in to Fave1 to save.')]);
  return;
}
Off or undeclaredWhat your code seesCheck
page.text · page.selection · pageThe field is simply absent — text · selection · document are undefinedctx.can(…)
aichat() · stream() · run() · speak() reject with denied, ctx.ai.status() says off, and choices() · usage() · voices() answer empty (no AIs · null · nothing ready). Its switch lives in Settings › AI with the monthly limit — the person may also have no Fave1 credits yet (no-credits)ctx.ai.status()
storage · pub · clipboardEvery call rejects with a typed denied error — ctx.files, ctx.shared, ctx.stickers, ctx.purchases and ctx.live.join() included, since they ride on the same two switches. Storage keeps its data, files and shared links while off; pub clears its value, and no room can be joined.ctx.can(…)
camera · micopen() rejects with denied. Nothing turns on, and the browser never asks.ctx.can(…)

ctx.perms.open() opens their permission screen in a new tab — turning things on is always theirs to do, never yours.

clipboard

With clipboard declared, ctx.clipboard.read() pastes — Fave1 asks the person every time — and ctx.clipboard.write(text) copies a line of text from anywhere in your app (ctx.clipboard). If you only copy, you may not need it: a Copy button that calls navigator.clipboard.writeText() inside the tap works with no permission at all (Beyond ctx) — and one less sentence on your store card.

Ask for the narrowest one

Need the article body? page.text. Need what they highlighted? page.selection. Need to rewrite the DOM? page. Full power is one switch — and the store card says so out loud.

Less is faster. A narrower ask reads better on the store card and goes through review sooner. Adding page or a new permission in an update gets a closer look.
Adding one in an update. When the update is approved, everyone who already has your app gets the new permission — nobody is asked again. Anyone who switched a permission off in Settings keeps it off, so fold the new feature behind ctx.can().