plugin.json
Every widget plugin carries a manifest named plugin.json, which describes the plugin, the permissions that it asks for and the widgets that it contributes. This page lists the JSON Schema of the manifest. Plugin package and manifest explains what each part means and how a package is laid out.
The Manifest model in backend-api/backend/api/widget_plugins/manifest.py defines the manifest. The schema below is the one that the model produces, followed by the models that it refers to. The page is generated from backend-api/backend/reference-data/plugin_manifest_schema.json, which the backend's exporter writes from the model.
Schema
plugin.json
plugin.jsonProperties
A settings form that an organization's admin fills in. It must not hold secrets.
checksumstringrequiredpattern ^sha256-[A-Za-z0-9_-]{43}$The text sha256- followed by the base64url SHA-256 of the sorted lines that each hold a file's path, a zero byte, the file's SHA-256 in hexadecimal and a newline, for every file except plugin.json. The command plugin_check --digest prints it.
The widgets that the plugin contributes.
cspmap<string, string[]> | nulldefaultnullThe sources that the frame itself may reach, by directive.
cspNotesmap<string, string> | nulldefaultnullOne sentence for each directive in csp that explains why the frame needs it.
The data that the backend reads for the user.
2 nested properties
idstringrequiredpattern ^[a-z][a-z0-9_-]{0,63}$The data source's id, unique within the plugin.
purposestringrequiredmaxLength 300What the backend reads from the data source. Admins read this text in the review.
descriptionstringdefault""maxLength 300A short description of the plugin.
The module and the style sheets that the frame receives.
The host API version and the AFM version that the package is built against. A host that implements other versions blocks the package.
iconstring | nulldefaultnullA file under assets/ that serves as the plugin's icon.
idstringrequiredpattern ^[a-z][a-z0-9-]{1,47}$The plugin's id. It equals the name of the directory that holds the plugin's versions.
identity"none" | "pseudonymous"default"none"Whether the backend learns a pseudonymous id of the user.
manifestVersion1requiredThe version of the manifest format.
namestringrequiredminLength 1maxLength 80The name that admins and users see.
Who publishes the plugin. Admins see the values as the package states them, and Workspace does not verify them.
The secrets that proxies and backend routes send. A manifest never contains a value.
2 nested properties
namestringrequiredpattern ^[a-z][a-z0-9_]{0,63}$The secret's name, in lowercase letters, digits and underscores.
purposestringrequiredmaxLength 300What the secret is for. Admins read this text in the review.
What the server does for the plugin: the hosts that it calls, its proxies and its backend.
signaturesnulldefaultnullReserved. A manifest that sets it is blocked, because this host verifies no signatures.
versionstringrequiredpattern ^(0|[1-9]\d{0,5})\.(0|[1-9]\d{0,5})\.(0|[1-9]\d{0,5})$The version, in the form major.minor.patch with numbers only. It equals the name of the version's directory.
Action
ActionProperties
iconstringrequiredOne of the icons that the host offers, by name, or an SVG file of the package under assets/. The host draws only the SVG elements and attributes that it allows.
idstringrequiredpattern ^[a-z][a-z0-9_-]{0,31}$The action's id, unique within the widget. The module receives it when the user picks the action.
labelstringrequiredminLength 1maxLength 40The text of the menu item, or the tooltip of the button.
placement"navbar" | "menu"requirednavbar puts a button in the card's header, menu puts an item in the card's options menu.
togglesstring | nulldefaultnullA boolean setting of the widget that the button switches on and off. The button shows as pressed while the setting is on. Only a navbar button toggles.
Backend
BackendProperties
protocol1requiredThe version of the protocol that the API speaks with the backend.
The routes that the backend serves.
4 nested properties
argsobjectmaxProperties 32The arguments that the route accepts, by name. The API checks them before it makes the call.
idstringrequiredpattern ^[a-z][a-z0-9_-]{0,63}$The route's id, unique within the backend.
responseRouteResponseThe limits of the route's answer.
secretsstring[]maxItems 16The secrets that the route sends, by name. Each one is declared in the manifest's secrets.
Contributes
ContributesProperties
The skills that the plugin gives the agent.
3 nested properties
descriptionstringrequiredminLength 1maxLength 300What the skill is for.
filestringrequiredpattern ^skills/[A-Za-z0-9._-]{1,100}\.md$The markdown file of the skill, under
skills/in the plugin.slugstringrequiredminLength 2maxLength 50pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$The slug of the skill: lowercase letters, digits and single
-.
The widget types that the plugin offers.
15 nested properties
Buttons in the card's header and items in its options menu. The host draws them, and sends the module an action event when the user picks one.
5 nested properties
iconstringrequiredOne of the icons that the host offers, by name, or an SVG file of the package under assets/. The host draws only the SVG elements and attributes that it allows.
idstringrequiredpattern ^[a-z][a-z0-9_-]{0,31}$The action's id, unique within the widget. The module receives it when the user picks the action.
labelstringrequiredminLength 1maxLength 40The text of the menu item, or the tooltip of the button.
placement"navbar" | "menu"requirednavbar puts a button in the card's header, menu puts an item in the card's options menu.
togglesstring | nulldefaultnullA boolean setting of the widget that the button switches on and off. The button shows as pressed while the setting is on. Only a navbar button toggles.
What the widget gives the agent when the user asks for it in the chat: when it is useful, and the data the agent may fill in.
categorystring | nulldefaultnullThe category in Add widget.
descriptionstringdefault""maxLength 300What the widget shows.
gridGridThe widget's size on the dashboard grid.
The viz types that the widget renders for backend widgets.
3 nested properties
definitionobject | nulldefaultnullThe JSON Schema of the data.<type> object that a backend writes for the type. It is closed and bounded.
responseResponseThe JSON that the backend's endpoint returns for the type.
typestringrequiredpattern ^[a-z][a-z0-9_-]{1,31}$The viz type that the widget renders. It is the "type" value in a backend's widgets.json, and it cannot be a built-in type.
idstringrequiredpattern ^[a-z][a-z0-9_-]{0,47}$The widget's id, unique within the plugin.
The module's own traits and what they are bound to.
namestringrequiredminLength 1maxLength 80The name that Add widget shows.
paramsobject[]maxItems 32The parameters of a standalone widget, written as in widgets.json. Every parameter has a paramName, and the names are unique.
permissionsstring[]maxItems 32The host permissions that the widget asks for.
The proxies and backend routes that the widget may call.
A form that the user edits for each widget instance.
standalonebooleandefaultfalseWhether the widget appears in Add widget on its own and needs no backend. A widget handles at least one type or is standalone.
subCategorystring | nulldefaultnullThe sub-category in Add widget.
DataSource
DataSourceProperties
idstringrequiredpattern ^[a-z][a-z0-9_-]{0,63}$The data source's id, unique within the plugin.
purposestringrequiredmaxLength 300What the backend reads from the data source. Admins read this text in the review.
Entry
EntryProperties
modulestringrequiredThe module, one .js file outside backend/.
stylesstring[]maxItems 8The style sheets, .css files outside backend/.
Grid
GridProperties
hintegerdefault12minimum 1maximum 100The default height on the dashboard grid.
minHinteger | nulldefaultnullThe smallest height that the user may give the widget.
minWinteger | nulldefaultnullThe smallest width that the user may give the widget.
wintegerdefault20minimum 1maximum 40The default width on the dashboard grid.
Handle
HandleProperties
definitionobject | nulldefaultnullThe JSON Schema of the data.<type> object that a backend writes for the type. It is closed and bounded.
responseResponseThe JSON that the backend's endpoint returns for the type.
typestringrequiredpattern ^[a-z][a-z0-9_-]{1,31}$The viz type that the widget renders. It is the "type" value in a backend's widgets.json, and it cannot be a built-in type.
HostTarget
HostTargetProperties
afmstringrequiredmaxLength 16The AFM version that the package follows, as text.
apiintegerrequiredThe host API version that the package is built against.
ModelSpec
ModelSpecProperties
traitsobjectmaxProperties 64The module's own trait names, each bound to host state.
Proxy
ProxyProperties
argsobjectmaxProperties 32The arguments that the proxy accepts, by name. The server refuses unknown arguments.
bodymap<string, string | integer | number | boolean | null> | nulldefaultnullThe JSON body of a POST request, a flat object with literal names. A field whose value is exactly ${arg:<name>} keeps the type of the argument, and text around a token turns the field into a string.
headersmap<string, string>maxProperties 16The headers of the request. A value may contain ${secret:<name>} and nothing else. A manifest cannot set a header that changes how a request travels.
idstringrequiredpattern ^[a-z][a-z0-9_-]{0,63}$The proxy's id, unique within the plugin.
method"GET" | "POST"default"GET"The method of the request that the server makes.
querymap<string, string>maxProperties 32property names: maxLength 128The query of the request, with literal names. A value may contain ${arg:<name>}, and the server leaves out a value whose argument is absent.
responseProxyResponseThe limits of the upstream's answer.
urlstringrequiredminLength 1maxLength 2048The https URL of the request, with a literal host and port that appear in server.network and no query or fragment. A ${arg:<name>} token may appear in the path after the host.
ProxyArg
ProxyArgProperties
maxLengthintegerdefault256minimum 1maximum 2048The most characters that a string argument may have.
maximumnumber | nulldefaultnullThe largest value that a number argument may have.
minimumnumber | nulldefaultnullThe smallest value that a number argument may have.
requiredbooleandefaultfalseWhether a call must supply the argument.
type"string" | "number" | "boolean" | "enum"requiredThe kind of value that the argument holds.
values(string | integer | number | boolean)[] | nulldefaultnullThe values that an enum argument may have.
ProxyResponse
ProxyResponseProperties
accepts("application/json" | "text/plain" | "text/csv" | "text/markdown" | "text/html" | "application/xml")[]minItems 1The content types that the server accepts from the upstream. A response of another type is refused.
maxBytesintegerdefault1048576minimum 1maximum 26214400The most bytes that the server reads from the upstream. The deployment caps the value as well.
timeoutMsintegerdefault10000minimum 100maximum 30000How long a call may take, in milliseconds. The deployment caps the value as well.
Publisher
PublisherProperties
namestringrequiredminLength 1maxLength 100The publisher's name.
urlstring | nulldefaultnullThe publisher's website, an https URL.
Response
ResponseProperties
accepts"json" | "file"default"json"The kind of answer that the backend returns:
json, orfile, which the host reads as bytes and gives the module as{ file: { name, mime, base64 } }.descriptionstringdefault""maxLength 300What the backend returns.
schemaobject | nulldefaultnullA JSON Schema of the answer.
Route
RouteProperties
argsobjectmaxProperties 32The arguments that the route accepts, by name. The API checks them before it makes the call.
idstringrequiredpattern ^[a-z][a-z0-9_-]{0,63}$The route's id, unique within the backend.
responseRouteResponseThe limits of the route's answer.
secretsstring[]maxItems 16The secrets that the route sends, by name. Each one is declared in the manifest's secrets.
RouteArg
RouteArgProperties
maxLengthintegerdefault256minimum 1maximum 32768The most characters that a string argument may have.
maximumnumber | nulldefaultnullThe largest value that a number argument may have.
minimumnumber | nulldefaultnullThe smallest value that a number argument may have.
requiredbooleandefaultfalseWhether a call must supply the argument.
type"string" | "number" | "boolean" | "enum"requiredThe kind of value that the argument holds.
values(string | integer | number | boolean)[] | nulldefaultnullThe values that an enum argument may have.
RouteResponse
RouteResponseProperties
maxBytesintegerdefault1048576minimum 1maximum 5242880The most bytes that the route may answer with. The deployment caps the value as well.
timeoutMsintegerdefault10000minimum 100maximum 30000How long a call may take, in milliseconds. The deployment caps the value as well.
Secret
SecretProperties
namestringrequiredpattern ^[a-z][a-z0-9_]{0,63}$The secret's name, in lowercase letters, digits and underscores.
purposestringrequiredmaxLength 300What the secret is for. Admins read this text in the review.
Server
ServerProperties
The plugin's own server-side code.
networkstring[]maxItems 32The https origins that the server may call for the plugin and, for a backend, the tcp://host:port endpoints that it opens.
The requests that the server makes on behalf of widgets.
8 nested properties
argsobjectmaxProperties 32The arguments that the proxy accepts, by name. The server refuses unknown arguments.
bodymap<string, string | integer | number | boolean | null> | nulldefaultnullThe JSON body of a POST request, a flat object with literal names. A field whose value is exactly ${arg:<name>} keeps the type of the argument, and text around a token turns the field into a string.
headersmap<string, string>maxProperties 16The headers of the request. A value may contain ${secret:<name>} and nothing else. A manifest cannot set a header that changes how a request travels.
idstringrequiredpattern ^[a-z][a-z0-9_-]{0,63}$The proxy's id, unique within the plugin.
method"GET" | "POST"default"GET"The method of the request that the server makes.
querymap<string, string>maxProperties 32property names: maxLength 128The query of the request, with literal names. A value may contain ${arg:<name>}, and the server leaves out a value whose argument is absent.
responseProxyResponseThe limits of the upstream's answer.
urlstringrequiredminLength 1maxLength 2048The https URL of the request, with a literal host and port that appear in server.network and no query or fragment. A ${arg:<name>} token may appear in the path after the host.
SettingsSpec
SettingsSpecProperties
defaultsobjectThe default value of each property. The defaults satisfy the schema.
schemaobjectThe JSON Schema of the form, a flat object of simple properties.
Skill
SkillProperties
descriptionstringrequiredminLength 1maxLength 300What the skill is for.
filestringrequiredpattern ^skills/[A-Za-z0-9._-]{1,100}\.md$The markdown file of the skill, under
skills/in the plugin.slugstringrequiredminLength 2maxLength 50pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$The slug of the skill: lowercase letters, digits and single
-.
TraitBinding
TraitBindingProperties
access"read" | "readwrite"default"read"Whether the module may write the trait. Only params, param:<name>, state, config and config:<key> can be readwrite.
bindstringrequiredmaxLength 80The host state that the trait is bound to: one of the traits that the host offers, or param:<name>, config:<key> or adminSettings:<key>.
Widget
WidgetProperties
Buttons in the card's header and items in its options menu. The host draws them, and sends the module an action event when the user picks one.
5 nested properties
iconstringrequiredOne of the icons that the host offers, by name, or an SVG file of the package under assets/. The host draws only the SVG elements and attributes that it allows.
idstringrequiredpattern ^[a-z][a-z0-9_-]{0,31}$The action's id, unique within the widget. The module receives it when the user picks the action.
labelstringrequiredminLength 1maxLength 40The text of the menu item, or the tooltip of the button.
placement"navbar" | "menu"requirednavbar puts a button in the card's header, menu puts an item in the card's options menu.
togglesstring | nulldefaultnullA boolean setting of the widget that the button switches on and off. The button shows as pressed while the setting is on. Only a navbar button toggles.
What the widget gives the agent when the user asks for it in the chat: when it is useful, and the data the agent may fill in.
categorystring | nulldefaultnullThe category in Add widget.
descriptionstringdefault""maxLength 300What the widget shows.
gridGridThe widget's size on the dashboard grid.
The viz types that the widget renders for backend widgets.
3 nested properties
definitionobject | nulldefaultnullThe JSON Schema of the data.<type> object that a backend writes for the type. It is closed and bounded.
responseResponseThe JSON that the backend's endpoint returns for the type.
typestringrequiredpattern ^[a-z][a-z0-9_-]{1,31}$The viz type that the widget renders. It is the "type" value in a backend's widgets.json, and it cannot be a built-in type.
idstringrequiredpattern ^[a-z][a-z0-9_-]{0,47}$The widget's id, unique within the plugin.
The module's own traits and what they are bound to.
namestringrequiredminLength 1maxLength 80The name that Add widget shows.
paramsobject[]maxItems 32The parameters of a standalone widget, written as in widgets.json. Every parameter has a paramName, and the names are unique.
permissionsstring[]maxItems 32The host permissions that the widget asks for.
The proxies and backend routes that the widget may call.
A form that the user edits for each widget instance.
standalonebooleandefaultfalseWhether the widget appears in Add widget on its own and needs no backend. A widget handles at least one type or is standalone.
subCategorystring | nulldefaultnullThe sub-category in Add widget.
WidgetArtifact
WidgetArtifactProperties
dataobjectrequiredThe JSON Schema of the data the agent may fill in.
descriptionstringrequiredminLength 1maxLength 300When the agent shows the widget in the chat.
WidgetServer
WidgetServerProperties
proxiesstring[]maxItems 32The ids of the proxies that the widget may call. The widget then needs the permission core:proxy:call, and it needs it only for this purpose.
routesstring[]maxItems 32The ids of the backend routes that the widget may call. The widget then needs the permission core:backend:call, and it needs it only for this purpose.