Skip to content

Glossary

Code that runs on your instance when something happens: an XRPC query or procedure is called, a record or label arrives, or a job runs. Every script defines handle(input, ctx). input is what the trigger passes (a query’s parameters, a procedure’s body, the record event). ctx carries the caller and the run’s context. A script loads what it needs with require. Scripts are written in a language an installed interpreter runs: Lua, JavaScript or TypeScript.

v2’s script globals (db, Record, params and 29 others) are gone in v3. See Migrating scripts to v3.

A plugin that runs scripts in one language. HappyView ships without one, so until you install one, no script can be saved or run. The official interpreters are happyview-lua, happyview-javascript and happyview-typescript. Each claims a language ID (lua, javascript, typescript); a script runs on the interpreter that claims its language.

A plugin that gives scripts an API, loaded with require: require("happyview.db") for querying records, for example. Libraries are installed separately from interpreters, and an interpreter declares which libraries it supports. The internal. namespace (internal.json, internal.logging and so on) is reserved for modules the interpreter provides itself.

A WebAssembly module that extends HappyView. There are three types: interpreters, libraries and auth plugins, which link accounts on other platforms. A plugin’s manifest must declare api_version "2" and list its capabilities; HappyView refuses anything else. You install plugins from the registry, from a URL, or from a file.

Something a plugin is allowed to do, such as records:read, network:request or secrets:read. A plugin’s manifest lists the capabilities it needs. HappyView checks that list against what the plugin’s code actually imports, refuses a plugin that imports more than it declares, and shows you the list to approve when you install it. Each capability carries a risk level, from low to critical.

Where HappyView finds plugins to install. The registry is a set of software.release atproto records: a project per plugin (software.release.project), with its versions (software.release.version). A project is named by its publisher’s DID plus a name, for example happyview-lua. HappyView reads the registry at https://api.happyproto.at and refreshes its registry listing every 15 minutes. PLUGIN_REGISTRY_URL points it elsewhere, or off stops HappyView reading the registry.

A registry install is checked by CID: HappyView fetches the plugin’s manifest and module from the registry, refuses any bytes whose CID doesn’t match, and fetches them again at every startup and reload. Updates only ever come from the publisher you installed from.

A line of releases a registry project publishes: latest for releases, beta and alpha for prereleases. An install follows a channel, and is offered the next version on it, unless you pin it to one version. During the v3 alpha, the official interpreters are published on alpha only.

What a publisher says about a version: active or deprecated (both installable), or unavailable or retired (not installable). A plugin whose version is retired after you install it keeps running; the dashboard marks it with the publisher’s reason.

An app kept as files instead of built in the dashboard: its lexicons and scripts under src/, its interpreters and libraries in happyview.toml, and the exact plugin versions in happyview.lock. Run a project locally with hpy happyview dev, check it with check, test it with test, and deploy it to an instance with hpy happyview deploy. Deploying needs the project:deploy permission. HappyView also runs a project directly when HAPPYVIEW_PROJECT points at its directory.

HappyProto’s command-line tool.

  • hpy happyview builds HappyView apps: create, dev, add, build, check, test, types, then login, deploy, logout and whoami for instances.
  • hpy registry signs in to the registry and publishes plugins to it: plugin init, publish, status and lifecycle.
  • hpy update and hpy channel keep hpy itself up to date.

One thing a dashboard user or API key may do, such as lexicons:publish or scripts:manage. A user holds any mix of them, often starting from a template. The full list is under Permissions.

A starting set of permissions for a new user: Viewer, Operator, Manager or Full Access. Each includes everything in the one before it.

A privilege an operator holds: every permission, unrestricted. Usually one operator has it; only an operator who holds it can transfer it to another, and the dashboard marks them Owner. On a fresh instance it goes to the first person to sign in, unless SUPERADMIN_DID names someone else.

An atproto OAuth permission set that an app asks for at sign-in to use an instance’s admin API. HappyView’s is dev.happyview.adminFull (“Manage your HappyView instances”), which grants rpc on dev.happyview.admin.manage. An app holding it acts with the permissions the signed-in user already has on that instance, never more. hpy signs in with it.

Where an instance’s records come from and where they’re kept. A provider is a record source, a record storage, or both. Both are traits in the open happyview-provider crate. A stock instance uses the built-in Jetstream source and keeps everything in its own database.

What finds records on the network and hands them to HappyView. The built-in one is Jetstream, which also runs backfills.

Where the records of the collections it claims are kept, outside the instance’s own database. HappyView still runs record scripts, serves reads and handles writes for those collections. If the storage can’t be reached, record reads answer 503 “the record store is unavailable” rather than an empty result.

HappyProto’s hosted instances share one copy of public network records, through a record source and storage of HappyProto’s own. If you run HappyView yourself, it doesn’t apply to you.

HappyView has 52 permissions. A user holds any mix of them; the four built-in templates are starting points. Each template includes everything in the one before it: Viewer (10), Operator (14), Manager (41) and Full Access (all 52). The operator with superadmin holds every permission and can’t be restricted.

PermissionWhat it allowsLowest template that grants it
Lexicons
lexicons:createUpload and register new lexicon schemasManager
lexicons:readView registered lexicon schemasViewer
lexicons:deleteRemove lexicon schemasManager
lexicons:publishPublish lexicons to the network and manage publishing rulesManager
Records
records:readBrowse indexed AT Protocol recordsViewer
records:deleteDelete individual records from the indexManager
records:delete-collectionBulk-delete all records in a collectionFull Access
Script Variables
script-variables:createAdd or update environment variables for Lua scriptsManager
script-variables:readView script environment variable keys and valuesViewer
script-variables:deleteRemove script environment variablesManager
Users
users:createAdd new dashboard usersFull Access
users:readView the user list and their permissionsViewer
users:updateModify user permissionsFull Access
users:deleteRemove dashboard usersFull Access
API Keys
api-keys:createGenerate new API keys for admin accessOperator
api-keys:readView existing API keysViewer
api-keys:deleteRevoke existing API keysOperator
Backfill
backfill:createTrigger historical record backfill jobsOperator
backfill:readView backfill job status and progressViewer
System
stats:readView collection statistics and record countsViewer
events:readView the event logViewer
events:purgeBulk-delete event log entries matching a filterFull Access
Labelers
labelers:createSubscribe to external labeler servicesManager
labelers:readView subscribed labeler servicesManager
labelers:deleteUnsubscribe from labeler servicesManager
Settings
settings:manageModify instance settings, logo, and configurationManager
Plugins
plugins:readView installed plugins and their configurationManager
plugins:createInstall and configure new pluginsManager
plugins:deleteUninstall pluginsManager
API Clients
api-clients:viewView registered OAuth API clientsManager
api-clients:createRegister new OAuth API clientsManager
api-clients:editModify API client settings and credentialsManager
api-clients:deleteRemove registered API clientsManager
Dead Letters
dead-letters:readView failed hook executionsViewer
dead-letters:manageRetry, re-index, or dismiss dead lettersOperator
Spaces
spaces:createCreate new permissioned data spacesManager
spaces:readView space details, metadata, and membersManager
spaces:updateModify space settingsManager
spaces:deleteRemove spaces and their dataManager
spaces:manage-membersAdd or remove space members and rolesManager
spaces:manage-invitesCreate and revoke space invitationsManager
spaces:manage-recordsRead and write records within spacesManager
spaces:manage-credentialsIssue and revoke space access credentialsManager
Scripts
scripts:readView trigger-keyed scriptsViewer
scripts:manageCreate, update, and delete trigger-keyed scriptsManager
Jobs
jobs:readView background job status and progressFull Access
jobs:createQueue new background jobsFull Access
jobs:manageCancel, pause, and resume background jobsFull Access
Linked Repos
linked-repos:readView linked repos, their status, and their scopesFull Access
linked-repos:createAdd linked repos and start authorization flowsFull Access
linked-repos:deleteRevoke linked repos and delete their stored sessionsFull Access
Project
project:deployReplace the instance’s project with a deployed bundle and start the backfills it declaresManager