The manifest
Every field of songstress.json, read from the SDK's own schema, and what a listing asks on top.
The manifest, songstress.json, sits at the root of your extension. It says what the extension is, what it adds to
Songstress, and what it may do. The tables on this page are the manifest's types in songstress/manifest, which
the SDK generates from its JSON Schema (songstress/schema/extension.v1.json), so they say exactly what a server
checks. Open a field to see its full type and what it means.
Point an editor at the schema and it checks the file as you type:
{ "$schema": "https://songstress.app/schema/extension/v1.json" }The rules of the file
- It is UTF-8 JSON, at most 256 KiB, with objects and lists nested at most 16 deep, and no key written twice in one object. No comments, no trailing commas, no byte-order mark.
- Every object is closed: a field the schema doesn't name is an error, not something ignored.
- Text is one line in one language, with no control character and nothing that draws nothing or turns the direction
of text (
TEXT_UNSAFE). The joiners and marks that scripts and emoji need are fine. Lengths count characters. - Every path is a plain path from the package root with forward slashes, like
assets/icon.png: no.or.., no leading or doubled slash, none of\ : * ? " < > | % #.
The manifest's fields
Prop
Type
The id
id is publisher.name. Each part is lowercase letters, digits and single hyphens, 80 characters in all. A publisher
may not be named like a part of the API (commands, hooks, host, jobs, library, listening, net,
network, player, providers, queue, routes, secrets, settings, storage, themes, ui, users).
The publisher songstress is Songstress's own: a server installs a songstress.* id from the official list alone.
Engines
Prop
Type
^0.1.0 is the usual answer. A feature that came with a later API version asks for that version: a status item
needs ^0.1.4, for example. See Versions.
Images
Each image states its path and its real size in pixels. Whoever installs or lists the package holds the files to it.
The icon:
Prop
Type
The banner, the wide image of the extension's card:
Prop
Type
Each screenshot:
Prop
Type
Code
Prop
Type
Prop
Type
Whatever needs code needs its entry (ENTRY_REQUIRED), and an entry nothing would ever start is an error too
(ENTRY_UNUSED). See Hooks.
Permissions
permissions is an object keyed by the permission's name. Each one has a reason, which the person granting it reads.
See Permissions.
Prop
Type
A permission with nothing more than its reason:
Prop
Type
network:
Prop
Type
network.local:
Prop
Type
What it contributes
Everything an extension adds is under contributes. An id there is lowercase letters, digits and single hyphens,
starts with a letter, is at most 40 characters, and is unique among its kind (DUPLICATE_ID). A title is 1 to 60
characters and a description 1 to 160. An icon names one from Songstress's icon set; a name an app doesn't know is
drawn as the extension's mark.
Prop
Type
Each kind has its own page: commands, menus and settings, pages, panels, status items and views, themes, providers, and jobs, routes and sign-in in the host API.
Install and listing
One validator checks a manifest everywhere: in your editor's tools, when a server installs, when a listing is submitted. It has two profiles.
installis what a server takes from a GitHub link or a file. Everything above.listingis what the official list and the Marketplace ask on top: alicense(one ofMIT,Apache-2.0,BSD-2-Clause,BSD-3-Clause,ISC,0BSD,MPL-2.0,LGPL-3.0-only,LGPL-3.0-or-later,GPL-3.0-onlyorGPL-3.0-or-later), arepositoryathttps://github.com/owner/name, one category, the icon, and three to six screenshots.
songstress check --profile listing tells you what a listing still needs. Every code it can report is in
Validation codes.
From API 0.1.8, an extension with a play or download provider may be listed like any other. Both kinds stay
switched off on a server until its admin turns each one on.
Check it from code
songstress/manifest runs anywhere JavaScript does, with no host:
import { parseManifest } from 'songstress/manifest'
declare const bytes: Uint8Array // the file's bytes, as read from disk
const result = parseManifest(bytes, { profile: 'install' })
if (result.valid) {
console.log(result.manifest.id)
} else {
for (const issue of result.issues) console.log(issue.code, issue.pointer, issue.message)
}parseManifest takes the file's bytes (best: only they can show a file that isn't UTF-8) or its text, and
validateManifest a value that is already parsed. apiVersion, when given, is the API version of the host that is
checking: a manifest whose engines.songstress leaves it out is refused. Each issue has a stable code, a JSON
Pointer to where it is, and a sentence. The code and the pointer are the contract; the sentence may be reworded.