Write the plugin manifest
The manifest is plugins/<name>/tilecast.plugin.json. Tilecast validates it at build time and when the server hosts the plugin.
Use the generated JSON Schema in your editor. The exact field rules live in the Plugin Manifest API 3, Plugin API v2, and shared plugin contract engineering references.
Identity
Section titled “Identity”These fields describe the plugin in the catalog:
apiVersionis3for a new plugin that stores instances or settings, and2for one that does not. Plugin API v1 is retired, and Tilecast refuses a manifest withapiVersion1.idis the stable snake_case identifier.definitionVersionversions the plugin’s persisted and Player-facing definition.name,description,category, andicondescribe it in Studio.maintainerslists the people or teams responsible for the subject.instanceNoungives the singular and plural name shown with instance counts.requirementstells an operator what the plugin expects before installation.usesis plain catalog text describing the Tilecast capabilities it uses.
The directory name is the ID with underscores changed to hyphens.
Capabilities
Section titled “Capabilities”Only declare capabilities the implementation uses.
{ "capabilities": { "backgroundWorkers": true, "network": ["api.example.org"] }}backgroundWorkers is required for a WorkerProvider. network lists server-side hosts a Plugin API v2 plugin contacts; a Plugin Manifest API 3 plugin declares connections instead. Player behavior is a player contribution, described below.
plugin.CheckDeclarations compares the manifest with the Go interfaces the plugin implements.
Entry points
Section titled “Entry points”The build uses fixed paths:
{ "server": { "entrypoint": "./plugin.go" }, "studio": { "route": "/plugins/transit-alerts", "entrypoint": "./studio/index.tsx" }, "player": { "runtime": { "entrypoint": "./runtime/index.ts" } }}Leave out studio when the plugin has no Studio pages.
Player contribution
Section titled “Player contribution”Player behavior is its own optional contribution. Leave out player entirely when the plugin does nothing on screens.
{ "player": { "state": [{ "type": "transit_alert", "version": 1 }], "runtime": { "entrypoint": "./runtime/index.ts", "services": { "required": ["player.clock@1", "player.surface@1"], "optional": ["player.presentation.observe@1"] }, "surfaces": [ { "id": "ticker", "slots": ["strip.bottom"], "tier": "scheduled" } ] } }}statelists the Player state types the plugin’s server projects and its Player behavior reads.runtimeis portable Player behavior in the Shared Runtime.serviceslists what it needs; a Player without a required service doesn’t run it, and a missing optional service is just unavailable.surfacesgives each visual contribution its own slots and tier. Only declare it when you requestplayer.surface@1.nativelists first-party native contributions, each a Rust crate innative/<id>/. The crate exportscontribution(), andplugins:generatelinks it into the Player builds that include native plugins.eventslists the ephemeral events between your native part and your Shared Runtime part: aname, aversion, and thesourcethat raises it (nativeorruntime). Declare it withplayer.events@1and both parts.providers(insideruntime) lists the presentation providers you offer withplayer.presentation.provide@1.
If older Players must keep showing your plugin, list the entry types they understand in v1ManifestTypes. Countdown Bar and Emergency Alerts do this.
API routes
Section titled “API routes”A plugin with HTTP routes declares the prefixes it owns and its OpenAPI fragment:
{ "api": { "basePaths": ["/plugins/transit-alerts"], "openapi": "./api/openapi.yaml" }}The server refuses route collisions with core or another plugin.
Studio routes
Section titled “Studio routes”studio.route is the management route under /plugins/<directory>.
Use studio.additionalRoutes when the plugin owns a separate Studio surface such as a portal or inbox. The Studio definition must contribute matching standaloneRoutes.
Store listing
Section titled “Store listing”A plugin can dress up its Plugin Store page with a second file, plugins/<name>/tilecast.store.json. It holds presentation only:
{ "publisher": { "name": "Tilecast", "url": "https://tilecast.org" }, "longDescription": "A few sentences for the page's About section.", "artwork": { "icon": "./store/icon.webp", "screenshots": [ { "src": "./store/01-overview.webp", "alt": "What the screenshot shows." } ] }}Keep the images in the plugin’s store/ folder as .webp or .png. Use up to five screenshots at one size, 16:9 (about 1920 × 1080), and write alternative text for each. Attach the file in plugin.go with .WithStore(...). Tilecast checks the paths when the server starts, so a typo is a build failure rather than a broken image.
The file never changes what the plugin is or does. Identity, requirements, capabilities, and trust all still come from tilecast.plugin.json. A plugin without a Store file still works and shows its built-in icon and no screenshots. See the engineering reference for every rule.
Public docs
Section titled “Public docs”A plugin can publish pages from its own directory:
{ "docs": { "pages": [ { "source": "./docs/index.mdx", "slug": "operations/plugins/transit-alerts" } ] }}The docs build checks slug collisions and adds declared pages to the public docs collection. The docs sidebar doesn’t list plugin pages. Link your page from the plugin catalog page, apps/docs/src/content/docs/operations/plugins.mdx, so readers can find it. A docs test fails when a declared page has no link there.
Settings and instances (Plugin Manifest API 3)
Section titled “Settings and instances (Plugin Manifest API 3)”If your plugin declares instances or uses a generated organization settings page in Studio, provide api.basePaths for the host’s API routes.
A version 3 plugin describes what it stores, and Tilecast stores it. You write no tables, routes, API description, or Studio pages for ordinary instances.
{ "apiVersion": 3, "api": { "basePaths": ["/plugins/room-sign"] }, "studio": { "route": "/plugins/room-sign" }, "settings": { "organization": [ { "key": "apiToken", "label": "API token", "control": "secret" } ] }, "instances": [ { "kind": "sign", "noun": { "singular": "sign", "plural": "signs" }, "path": "signs", "operations": { "singular": "RoomSign", "plural": "RoomSigns" }, "targeting": "screens", "schedule": "none", "priority": { "minimum": -10, "maximum": 10, "default": 0 }, "fields": [ { "key": "title", "label": "Title", "control": "text", "required": true } ] } ]}- A plugin has at most sixteen instance kinds. Studio shows two to four as tabs and more as a drop-down, and each kind’s address stays the same either way.
- A plugin doesn’t need instances at all. With
"instances": [], its page opens on the first thing it has: settings, connections, feeds, webhooks, or status. targetingisscreensornone.scheduleisnone,window, orweekly.fieldsuse the same vocabulary as Widget settings, plussecret. A secret is encrypted and never shown again.personalmarks a field that holds personal data and says how long to keep it.- Tilecast saves each change with a revision, so two people editing at once can’t overwrite each other.
You then write two small hooks in Go: one that checks an instance makes sense, and one that turns an instance into what a Player shows. See the Plugin Manifest API 3 reference for the details, including the service client and what isn’t available yet.
Connections (Plugin Manifest API 3)
Section titled “Connections (Plugin Manifest API 3)”A version 3 plugin never opens its own network connection. It declares each service it talks to, and an Owner or Administrator creates the connection in Studio.
{ "services": ["http.fetch@1", "secrets.read@1"], "connections": [ { "id": "calendar", "title": "Calendar API", "type": "http", "origins": ["https://api.example.com"] }, { "id": "gateway", "title": "Meter gateway", "type": "http", "origins": "operator", "privateNetwork": "allowed", "plainHttp": "allowed" } ], "settings": { "organization": [ { "key": "calendar", "label": "Calendar", "control": "connection", "connections": ["calendar"] }, { "key": "apiToken", "label": "API token", "control": "secret" } ] }}originsis a list ofhttpsorigins, oroperatorwhen the operator enters one. An origin is a scheme, host, and port, with no path.privateNetworkandplainHttpsay what a connection could do. Each still needs its own permission from the operator. Plain HTTP works only with an operator origin on a private address.allowPlaintextSecretlets a secret travel over plain HTTP after a third permission.maxResponseBytes(up to 16 MiB) andtimeoutSeconds(up to 60) raise the defaults of 1 MiB and 10 seconds. The install review shows a raised limit.- A
connectionfield stores the ID of a connection record. List the declarations it accepts inconnections.
OAuth connections
Section titled “OAuth connections”A service that signs people in with OAuth 2.0, such as Google Calendar or Square, uses type: "oauth2". Tilecast runs the sign-in, keeps the tokens, renews them, and adds the Authorization: Bearer header to your http.fetch@1 requests. Your code never sees a token and must not send its own Authorization header on that connection.
{ "id": "google", "title": "Google Calendar", "type": "oauth2", "origins": ["https://www.googleapis.com"], "oauth": { "authorizationEndpoint": "https://accounts.google.com/o/oauth2/v2/auth", "tokenEndpoint": "https://oauth2.googleapis.com/token", "revocationEndpoint": "https://oauth2.googleapis.com/revoke", "scopes": ["https://www.googleapis.com/auth/calendar.readonly"], "tokenEndpointAuthMethod": "client_secret_post", "authorizationParameters": { "access_type": "offline", "prompt": "consent" } }}- Every endpoint and origin is
https. An OAuth connection can’t use an operator origin, the private network, or plain HTTP. - Ask for the smallest read-only scopes the plugin needs. The install review lists them.
tokenEndpointAuthMethodisclient_secret_basic,client_secret_post, ornone. UsetokenRequestFormat: "json"only for a provider that takes JSON token requests.- Tilecast sets the standard parameters itself (
client_id,redirect_uri,state, the PKCE challenge, and so on).authorizationParametersholds up to eight extra fixed values, such asaccess_type. - Changing an endpoint or a scope in a later release asks operators to connect again.
- Handle these failure codes from
http.fetch@1:oauth_not_connected,oauth_reconnect_required, andoauth_refresh_failed. Show the plugin as needing attention; don’t retry in a loop.
See Use a connection from server code for the request side, and the Plugin connections reference for every rule.
Feeds (Plugin Manifest API 3)
Section titled “Feeds (Plugin Manifest API 3)”A feed is a set of records that your plugin publishes for Widgets. Tilecast stores it, lets operators change allowed fields, downloads images, and shows it as the Data Source <plugin id>.<feed id>. Don’t write a Data Source provider or an editor of your own.
{ "services": ["feeds.publish@1"], "feeds": [ { "id": "items", "version": 1, "title": "Menu items", "dataset": "instance", "instanceKind": "menu", "expectedRefreshSeconds": 900, "fields": [ { "key": "name", "label": "Name", "control": "text", "maxLength": 120, "override": "local_until_changed" }, { "key": "price", "label": "Price", "control": "number", "minimum": 0 }, { "key": "photo", "label": "Photo", "control": "url", "image": { "connection": "images" } } ] } ]}datasetisorganizationfor one dataset, orinstancefor one dataset per instance ofinstanceKind.- Fields use the configuration schema controls
text,multiline_text,select,number,integer,boolean,date,datetime, andurl, up to 16 fields. Text needs amaxLengthof at most 4,096. overridesays what operators may change:upstream(nothing, the default),local, orlocal_until_changed. Keep prices and availabilityupstream.imageturns aurlfield into an image that Tilecast downloads through the named connection. If the provider’s images live on a different host than its API, declare a separatehttpconnection for the image host.- Mark personal fields with
personaland a retention, as for settings. - Changing the fields means a new
version.
See the Plugin feeds reference for every rule.