The plugin file
Every field of a ghost-plugin/1 file, with its limits.
A plugin is one file of JSON, named <id>.uplinkplugin, in the ghost-plugin/1 format: one object holding the fields below. It's at most 256 KB (262,144 bytes) and nested at most 8 deep. Numbers in it are whole numbers, and null appears only where a field says it may. A key the format doesn't have is a problem at any depth (unknown_field), so a reviewer sees everything a plugin holds. Developer mode loads any file name, and the file laid out however you like.
The fields
| Field | What it is | Rules |
|---|---|---|
format | The format | Required. Exactly "ghost-plugin/1". |
id | Your plugin's id | Required. 3 to 24 lower-case letters and digits, starting with a letter; not one the app keeps (below). |
version | This version, like 1.0.0 | Required. Three whole numbers with dots between, each 0 to 99999 with no leading zero. Compared number by number: 1.10.0 is newer than 1.9.0. |
name | What it's called | Required. 1 to 32 characters, one line. Not a built-in plugin's name nor Uplink's. |
tagline | Its short line, under its name | Required. 1 to 60, one line. |
description | What it does, on its page | Required. 1 to 1,500; line breaks allowed. |
icon | Its picture | A square PNG in base64 (below). Not needed in Developer mode; needed to submit it. |
symbol | The plain icon drawn where a row needs one, and on its tile when it has no picture | An icon name (below). puzzle if left out. |
hue | Its colour | Required. One of the sixteen hues below. |
shelf | Its category in the Marketplace | Required. organise, safety, messages or tools. |
labels | Its tags in the Marketplace: on its card, on its page and in search | Required. 1 to 4 different ones from the sixteen below. |
permissions | What it may do beyond reading texts | Required, and may be []. Each one a rule uses must be listed (needs_permission), and each one listed must be used (permission_unused). What a plugin may do. |
links | The one web page its buttons may open | 0 or 1 https address (below), [] if left out. |
shots | The SHA-256s of its screenshots, in order | 0 to 4. The submission form fills this in from the screenshots you add; leave it out. |
developer | Your username | Needed to submit it; the form puts yours in. 3 to 20 lower-case letters, digits, dots and underscores, starting with a letter or digit, with no .. and none of uplink, ghost, gogho, official, verified or support in it. |
support | Where people get help with it | Needed to submit it. An https address or an email address (below), at most 200 characters. Shown on its page for anyone to see. |
whatsNew | What this version changed | 0 to 500 characters; line breaks allowed. |
minApp | The oldest Uplink it works in | A version, as version. An older app refuses it (needs_newer_app). |
settings | Its own settings | 0 to 24 (below); [] if left out. |
rules | What it does | Required. {"tags", "sections", "actions", "incoming"}, each optional, with at least one tag rule or one section (empty_pack). Tags, tabs and buttons. |
Hues
amber blue coral cyan green indigo lime magenta mint orange purple red rose slate yellow graphite
Categories (shelf)
organise (Organise), safety (Safety), messages (Messages), tools (Tools).
Tags (labels)
| In the file | Shown as | In the file | Shown as |
|---|---|---|---|
bills | Bills | money | Money |
codes | Codes | quiet | Quiet |
deliveries | Deliveries | replies | Replies |
events | Events | safety | Safety |
filters | Filters | school | School |
health | Health | shopping | Shopping |
language | Language | sorting | Sorting |
travel | Travel | work | Work |
Web and email addresses
A web address (in links, a link button's url, or support) is https, at most 200 characters, with no user name or password, no port, no # part, no spaces and no { or }. A query is allowed, but it's fixed: nothing from a text is ever put into an address. Its host is two or more parts of lower-case letters, digits and inner hyphens (example.com), none starting xn--; never an IP address, never a name ending .local, .lan, .home, .internal, .localhost or .arpa, and never gogho.st or ghost-sms.com, whose addresses the app opens itself (bad_url otherwise). An email address, for support only, is the usual name@example.com, its domain held to the same rules (bad_email).
Icon names
For symbol, and a section's, an action's or a setting's icon: any of the app's own icon names below. ghost, store and shield-check are kept for the app itself (its mark, the Marketplace and "Can't reach the internet"), and any other name is bad_icon_name.
activity alarm-clock alert-circle alert-triangle align-left anchor archive archive-restore arrow-down arrow-down-to-line arrow-left arrow-right arrow-up arrow-up-right-from-square arrow-up-to-line asterisk at-sign audio-lines ban baseline bell bold book book-open book-open-text bookmark bookmark-check bot box-select braces brain brush-cleaning calculator calendar-days calendar-plus calendar-search calendar-x chart-gantt chart-no-axes-combined check check-check check-circle-2 check-square chevron-down chevron-left chevron-right chevron-up chevrons-down chevrons-down-up chevrons-up chevrons-up-down circle circle-alert circle-check circle-dashed circle-dot circle-help circle-minus circle-question-mark circle-stop circle-user circle-x clipboard-paste clock code code-square compass contact-2 contact-round copy copy-plus crown curly-braces database door-open download ear edit edit-3 ellipsis ellipsis-vertical equal eraser external-link eye eye-off feather file file-code file-plus file-text film flag flame flask-conical folder folder-input folder-open folder-plus gauge git-branch globe graduation-cap grid-2-x-2-plus grid-2x2-plus grip-vertical group hard-drive hard-drive-download hard-drive-upload hash heading heading-1 heading-2 heading-3 help-circle highlighter history hourglass image image-plus info italic kanban-square key-round laptop layout-grid layout-list lightbulb link link-2 list list-checks list-filter list-ordered list-plus list-todo list-tree loader-2 loader-circle locate-fixed lock log-out magnet mail map-pin map-pinned maximize megaphone menu message-circle-question message-circle-question-mark message-square message-square-dashed message-square-plus message-square-quote mic minus minus-circle more-horizontal more-vertical network palette panel-left pause pen-box pen-line pen-square pencil pencil-line phone pin pin-off play plus puzzle refresh-cw repeat replace rotate-ccw rotate-ccw-clock rotate-cw scan-text scissors scroll-text search send settings shapes share-2 sidebar sigma sliders-horizontal smartphone snowflake sparkles spell-check spline square square-arrow-out-up-right square-check-big square-code square-dashed square-dashed-text square-kanban square-pen square-radical stars sticker stop-circle strikethrough subscript sun sun-moon sunrise superscript swatch-book table tag terminal text text-align-start text-cursor-input text-quote text-search text-select text-selection ticket trash trash-2 triangle-alert type underline undo-2 unlink usb user-2 user-check user-circle user-group user-minus user-plus user-round user-x users video volume-2 wand-2 wand-sparkles waves waves-horizontal wifi wifi-off workflow x x-circle zoom-in zoom-out
Ids, sections, tags and keys
| What | In the file | In the app |
|---|---|---|
| The plugin | id: 3 to 24 lower-case letters and digits, starting with a letter | x and its id: Bills is xbills. You'll see it in plugins.list and filters.classify, and its switch is plugin_xbills. No built-in plugin's id starts with x, so yours can never be mixed up with one. |
| A section | key: 1 to 12 lower-case letters, no digits | x, its id, 0, its key: xbills0bills. Never other. |
| A tag | tag: 1 to 16 lower-case letters and digits, starting with a letter | xbills.bill. A plugin's rules read only its own tags: it can't see, give or fake Spam's or Codes'. |
| A setting | key: 1 to 24 lower-case letters and digits, starting with a letter | Kept as plugin_xbills_extra. |
| An action | id: 1 to 24 lower-case letters and digits, starting with a letter | Unique within the plugin. |
| A choice | value: 1 to 16 lower-case letters and digits | Unique within its setting. |
A pattern broken is bad_key (bad_id for the plugin's id). These ids are the app's own, and no plugin may have them (id_reserved): codes kinds spam embeds actions replies quiet strangers cleaner translate recordcall scribe captions watch debt political sales scams reminders food deliveries appointments notices other ghost ghostmessaging official admin system market marketplace store plugin plugins settings messages, and any id with uplink, ghost or gogho in it.
The examples' ids, bills and parcels, load in Developer mode like any other, but can't be submitted (id_example: "That's the example's id: give your plugin an id of its own."), so nobody takes the id every reader of these pages starts with.
The icon
- Not needed in Developer mode: without one, the plugin's tile draws its
symbolon its hue. Submitting needs one, and the submission form makes it for you from any picture you choose or paste (256 pixels a side, smaller if it must be), so you only need what follows to put one in the file yourself. - A PNG, square, 64 to 512 pixels a side, holding only the chunks
IHDR,PLTE,tRNS,sRGB,gAMA,pHYs,IDATandIEND, with nothing afterIEND: so no animation, no text, no EXIF and no colour profile (bad_iconotherwise). - In base64, the standard alphabet with
=padding and no spaces or line breaks: at most 48,000 characters, and at most 36,000 bytes once decoded. - It's drawn over the plugin's hue, filling its tile. Transparent parts show the hue, so a white glyph on transparency looks like a built-in plugin's tile.
To make the base64 on a Mac:
base64 -i icon.png | tr -d '\n'
In PowerShell on Windows:
[Convert]::ToBase64String([IO.File]::ReadAllBytes('icon.png'))
Words in a plugin
Every string in a plugin, its phrases included, keeps these rules (bad_text, or phrase_bad_text for a phrase):
- No space at its start or end.
- One line. Only the
description,whatsNewand settings'hints may have line breaks, and only the plain one (\n). - Nothing invisible: no control characters, zero-width spaces or joiners, direction marks or overrides, soft hyphens, private-use characters (one draws a company's logo on some systems), tag characters, or blank-looking letters that make a name look empty.
- Lengths are counted as JavaScript and Dart count them, in UTF-16 code units: most letters are one, and an emoji is often two.
A name, and a section's label, can't be a built-in plugin's or one of their tabs' and kinds', nor have uplink, ghost or gogho in it (name_reserved). They're compared with look-alikes folded first, so "Сodes" with a Cyrillic С, or "Codes" in wide letters, is still Codes.
Settings
Each setting is an object with a type, shown on the plugin's page in the order written; a heading starts a new card.
type | Fields | Shown as |
|---|---|---|
toggle | key, label (1 to 60), hint (1 to 200), icon, and default (true or false, required) | A switch |
choice | key, label, hint, icon, options (2 to 8 of {"value", "label" (1 to 40), "hint" (1 to 120)}), and default (one of the values: choice_default otherwise) | A choice of one |
words | key, label, hint, icon, placeholder (1 to 60) | A field for the person's own words, a line each or with commas between: what a rule does with them |
note | label, hint, icon | A line of words |
heading | label, hint | A heading over the next card |
hint,iconandplaceholdermay be left out; everything else in the table is required.- Keys are unique across a plugin's settings (
duplicate). A rule that names a setting must name one there, of the right kind (unknown_setting). - A toggle an incoming rule names must start off (
"default": false), and is switched off again when the plugin is removed. On a computer or an iPhone its hint says it does nothing there. - The person's choices are kept when they remove the plugin, and are there again if they add it back.
The form it's sent in
When you submit a plugin, the app sends it in one fixed form: every object's keys sorted, no spaces or line breaks, every string written the one way. The Marketplace takes only that form, so a plugin's SHA-256 names exactly one file, and a change of one character is a new file that needs a new review. You never have to make it yourself: the submission form does, from whatever you loaded. Developer mode takes the file just as you wrote it.
The whole Bills file
The example on this site, bills.uplinkplugin, as it is. Parcels is the other one.
{
"format": "ghost-plugin/1",
"id": "bills",
"version": "1.0.0",
"name": "Bills",
"tagline": "Bills and payment reminders in a tab of their own",
"description": "Texts from companies about a bill (a statement that's ready, an amount due) go to a Bills tab, with the amount large on the row and a press to copy it. Receipts for payments you've made are a kind in the list's filter, which can mark them read as they come. Nobody in your contacts is ever sorted.",
"icon": "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAaklEQVR42u3awQ0AIAgAMfZfGoeQEMHeAMb0AT6MkCRJkq7K5gAAAPA2wLTzAQAAAAAAAAD1F6x68AAAAMAQBAAAAABbAAAAAIYgAAAAAGzbAgAAADAEAQAAAADAFgC/xAAA+AtAkiRJwzpcxpX3TIHg+gAAAABJRU5ErkJggg==",
"symbol": "calculator",
"hue": "amber",
"shelf": "organise",
"labels": [
"bills",
"money",
"sorting"
],
"permissions": [
"sort",
"copy",
"markread"
],
"developer": "yourname",
"support": "https://example.com/plugins/bills",
"settings": [
{
"type": "toggle",
"key": "autoread",
"label": "Mark receipts as read",
"hint": "As they come: texts that say a payment went through.",
"default": false,
"icon": "check-check"
},
{
"type": "words",
"key": "extra",
"label": "More words for bills",
"hint": "A text with any of these goes to Bills too.",
"placeholder": "council tax, water rates"
}
],
"rules": {
"tags": [
{
"tag": "bill",
"any": [
"your bill is ready",
"your statement is ready",
"amount due {amount}",
"amount due: {amount}",
"payment of {amount} is due",
"minimum payment due"
],
"wordsFrom": "extra",
"detail": {
"from": "token"
}
},
{
"tag": "paid",
"any": [
"payment received",
"thank you for your payment",
"payment of {amount} received",
"we've received your payment"
],
"detail": {
"from": "token"
}
}
],
"sections": [
{
"key": "bills",
"label": "Bills",
"icon": "calculator",
"kind": "tab",
"takes": {
"tagged": [
"bill"
],
"untagged": [
"paid"
]
},
"row": {
"value": "{tag:bill}",
"caption": "A bill",
"end": "copyamount"
}
},
{
"key": "receipts",
"label": "Receipts",
"icon": "check-check",
"kind": "filter",
"takes": {
"tagged": [
"paid"
]
}
}
],
"actions": [
{
"id": "copyamount",
"label": "Copy the amount",
"icon": "copy",
"slots": [
"row",
"list.conversation.menu",
"conversation.message.menu"
],
"when": {
"tagged": [
"bill"
]
},
"do": "copy",
"text": "{tag:bill}",
"say": "Amount copied"
}
],
"incoming": [
{
"in": "receipts",
"do": [
"markread"
],
"setting": "autoread"
}
]
}
}
Docs