Skip to main content

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​

objectno other properties

Properties

  • adminSettingsSettingsSpec | nulldefault null

    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.

  • contributesContributesrequired

    The widgets that the plugin contributes.

  • cspmap<string, string[]> | nulldefault null

    The sources that the frame itself may reach, by directive.

  • cspNotesmap<string, string> | nulldefault null

    One sentence for each directive in csp that explains why the frame needs it.

  • dataSourcesDataSource[]maxItems 16

    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 300

      What the backend reads from the data source. Admins read this text in the review.

  • descriptionstringdefault ""maxLength 300

    A short description of the plugin.

  • entryEntryrequired

    The module and the style sheets that the frame receives.

  • hostHostTargetrequired

    The host API version and the AFM version that the package is built against. A host that implements other versions blocks the package.

  • iconstring | nulldefault null

    A 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.

  • manifestVersion1required

    The version of the manifest format.

  • namestringrequiredminLength 1maxLength 80

    The name that admins and users see.

  • publisherPublisherrequired

    Who publishes the plugin. Admins see the values as the package states them, and Workspace does not verify them.

  • secretsSecret[]maxItems 16

    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 300

      What the secret is for. Admins read this text in the review.

  • serverServer | nulldefault null

    What the server does for the plugin: the hosts that it calls, its proxies and its backend.

  • signaturesnulldefault null

    Reserved. 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​

objectno other properties

Properties

  • iconstringrequired

    One 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 40

    The text of the menu item, or the tooltip of the button.

  • placement"navbar" | "menu"required

    navbar puts a button in the card's header, menu puts an item in the card's options menu.

  • togglesstring | nulldefault null

    A 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​

objectno other properties

Properties

  • protocol1required

    The version of the protocol that the API speaks with the backend.

  • routesRoute[]requiredminItems 1maxItems 32

    The routes that the backend serves.

    4 nested properties
    • argsobjectmaxProperties 32

      The 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.

    • The limits of the route's answer.

    • secretsstring[]maxItems 16

      The secrets that the route sends, by name. Each one is declared in the manifest's secrets.

Contributes​

objectno other properties

Properties

  • skillsSkill[]maxItems 20

    The skills that the plugin gives the agent.

    3 nested properties
    • descriptionstringrequiredminLength 1maxLength 300

      What 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 -.

  • widgetsWidget[]requiredminItems 1maxItems 20

    The widget types that the plugin offers.

    15 nested properties
    • actionsAction[]maxItems 11

      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
      • iconstringrequired

        One 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 40

        The text of the menu item, or the tooltip of the button.

      • placement"navbar" | "menu"required

        navbar puts a button in the card's header, menu puts an item in the card's options menu.

      • togglesstring | nulldefault null

        A 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.

    • artifactWidgetArtifact | nulldefault null

      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 | nulldefault null

      The category in Add widget.

    • descriptionstringdefault ""maxLength 300

      What the widget shows.

    • gridGrid

      The widget's size on the dashboard grid.

    • handlesHandle[]maxItems 8

      The viz types that the widget renders for backend widgets.

      3 nested properties
      • definitionobject | nulldefault null

        The JSON Schema of the data.<type> object that a backend writes for the type. It is closed and bounded.

      • responseResponse

        The 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.

    • modelModelSpec | nulldefault null

      The module's own traits and what they are bound to.

    • namestringrequiredminLength 1maxLength 80

      The name that Add widget shows.

    • paramsobject[]maxItems 32

      The parameters of a standalone widget, written as in widgets.json. Every parameter has a paramName, and the names are unique.

    • permissionsstring[]maxItems 32

      The host permissions that the widget asks for.

    • serverWidgetServer | nulldefault null

      The proxies and backend routes that the widget may call.

    • settingsSettingsSpec | nulldefault null

      A form that the user edits for each widget instance.

    • standalonebooleandefault false

      Whether the widget appears in Add widget on its own and needs no backend. A widget handles at least one type or is standalone.

    • subCategorystring | nulldefault null

      The sub-category in Add widget.

DataSource​

objectno other properties

Properties

  • idstringrequiredpattern ^[a-z][a-z0-9_-]{0,63}$

    The data source's id, unique within the plugin.

  • purposestringrequiredmaxLength 300

    What the backend reads from the data source. Admins read this text in the review.

Entry​

objectno other properties

Properties

  • modulestringrequired

    The module, one .js file outside backend/.

  • stylesstring[]maxItems 8

    The style sheets, .css files outside backend/.

Grid​

objectno other properties

Properties

  • hintegerdefault 12minimum 1maximum 100

    The default height on the dashboard grid.

  • minHinteger | nulldefault null

    The smallest height that the user may give the widget.

  • minWinteger | nulldefault null

    The smallest width that the user may give the widget.

  • wintegerdefault 20minimum 1maximum 40

    The default width on the dashboard grid.

Handle​

objectno other properties

Properties

  • definitionobject | nulldefault null

    The JSON Schema of the data.<type> object that a backend writes for the type. It is closed and bounded.

  • responseResponse

    The 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​

objectno other properties

Properties

  • afmstringrequiredmaxLength 16

    The AFM version that the package follows, as text.

  • apiintegerrequired

    The host API version that the package is built against.

ModelSpec​

objectno other properties

Properties

  • traitsobjectmaxProperties 64

    The module's own trait names, each bound to host state.

Proxy​

objectno other properties

Properties

  • argsobjectmaxProperties 32

    The arguments that the proxy accepts, by name. The server refuses unknown arguments.

  • bodymap<string, string | integer | number | boolean | null> | nulldefault null

    The 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 16

    The 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 128

    The query of the request, with literal names. A value may contain ${arg:<name>}, and the server leaves out a value whose argument is absent.

  • The limits of the upstream's answer.

  • urlstringrequiredminLength 1maxLength 2048

    The 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​

objectno other properties

Properties

  • maxLengthintegerdefault 256minimum 1maximum 2048

    The most characters that a string argument may have.

  • maximumnumber | nulldefault null

    The largest value that a number argument may have.

  • minimumnumber | nulldefault null

    The smallest value that a number argument may have.

  • requiredbooleandefault false

    Whether a call must supply the argument.

  • type"string" | "number" | "boolean" | "enum"required

    The kind of value that the argument holds.

  • values(string | integer | number | boolean)[] | nulldefault null

    The values that an enum argument may have.

ProxyResponse​

objectno other properties

Properties

  • accepts("application/json" | "text/plain" | "text/csv" | "text/markdown" | "text/html" | "application/xml")[]minItems 1

    The content types that the server accepts from the upstream. A response of another type is refused.

  • maxBytesintegerdefault 1048576minimum 1maximum 26214400

    The most bytes that the server reads from the upstream. The deployment caps the value as well.

  • timeoutMsintegerdefault 10000minimum 100maximum 30000

    How long a call may take, in milliseconds. The deployment caps the value as well.

Publisher​

objectno other properties

Properties

  • namestringrequiredminLength 1maxLength 100

    The publisher's name.

  • urlstring | nulldefault null

    The publisher's website, an https URL.

Response​

objectno other properties

Properties

  • accepts"json" | "file"default "json"

    The kind of answer that the backend returns: json, or file, which the host reads as bytes and gives the module as { file: { name, mime, base64 } }.

  • descriptionstringdefault ""maxLength 300

    What the backend returns.

  • schemaobject | nulldefault null

    A JSON Schema of the answer.

Route​

objectno other properties

Properties

  • argsobjectmaxProperties 32

    The 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.

  • The limits of the route's answer.

  • secretsstring[]maxItems 16

    The secrets that the route sends, by name. Each one is declared in the manifest's secrets.

RouteArg​

objectno other properties

Properties

  • maxLengthintegerdefault 256minimum 1maximum 32768

    The most characters that a string argument may have.

  • maximumnumber | nulldefault null

    The largest value that a number argument may have.

  • minimumnumber | nulldefault null

    The smallest value that a number argument may have.

  • requiredbooleandefault false

    Whether a call must supply the argument.

  • type"string" | "number" | "boolean" | "enum"required

    The kind of value that the argument holds.

  • values(string | integer | number | boolean)[] | nulldefault null

    The values that an enum argument may have.

RouteResponse​

objectno other properties

Properties

  • maxBytesintegerdefault 1048576minimum 1maximum 5242880

    The most bytes that the route may answer with. The deployment caps the value as well.

  • timeoutMsintegerdefault 10000minimum 100maximum 30000

    How long a call may take, in milliseconds. The deployment caps the value as well.

Secret​

objectno other properties

Properties

  • namestringrequiredpattern ^[a-z][a-z0-9_]{0,63}$

    The secret's name, in lowercase letters, digits and underscores.

  • purposestringrequiredmaxLength 300

    What the secret is for. Admins read this text in the review.

Server​

objectno other properties

Properties

  • backendBackend | nulldefault null

    The plugin's own server-side code.

  • networkstring[]maxItems 32

    The https origins that the server may call for the plugin and, for a backend, the tcp://host:port endpoints that it opens.

  • proxiesProxy[]maxItems 32

    The requests that the server makes on behalf of widgets.

    8 nested properties
    • argsobjectmaxProperties 32

      The arguments that the proxy accepts, by name. The server refuses unknown arguments.

    • bodymap<string, string | integer | number | boolean | null> | nulldefault null

      The 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 16

      The 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 128

      The query of the request, with literal names. A value may contain ${arg:<name>}, and the server leaves out a value whose argument is absent.

    • The limits of the upstream's answer.

    • urlstringrequiredminLength 1maxLength 2048

      The 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​

objectno other properties

Properties

  • defaultsobject

    The default value of each property. The defaults satisfy the schema.

  • schemaobject

    The JSON Schema of the form, a flat object of simple properties.

Skill​

objectno other properties

Properties

  • descriptionstringrequiredminLength 1maxLength 300

    What 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​

objectno other properties

Properties

  • 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 80

    The 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​

objectno other properties

Properties

  • actionsAction[]maxItems 11

    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
    • iconstringrequired

      One 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 40

      The text of the menu item, or the tooltip of the button.

    • placement"navbar" | "menu"required

      navbar puts a button in the card's header, menu puts an item in the card's options menu.

    • togglesstring | nulldefault null

      A 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.

  • artifactWidgetArtifact | nulldefault null

    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 | nulldefault null

    The category in Add widget.

  • descriptionstringdefault ""maxLength 300

    What the widget shows.

  • gridGrid

    The widget's size on the dashboard grid.

  • handlesHandle[]maxItems 8

    The viz types that the widget renders for backend widgets.

    3 nested properties
    • definitionobject | nulldefault null

      The JSON Schema of the data.<type> object that a backend writes for the type. It is closed and bounded.

    • responseResponse

      The 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.

  • modelModelSpec | nulldefault null

    The module's own traits and what they are bound to.

  • namestringrequiredminLength 1maxLength 80

    The name that Add widget shows.

  • paramsobject[]maxItems 32

    The parameters of a standalone widget, written as in widgets.json. Every parameter has a paramName, and the names are unique.

  • permissionsstring[]maxItems 32

    The host permissions that the widget asks for.

  • serverWidgetServer | nulldefault null

    The proxies and backend routes that the widget may call.

  • settingsSettingsSpec | nulldefault null

    A form that the user edits for each widget instance.

  • standalonebooleandefault false

    Whether the widget appears in Add widget on its own and needs no backend. A widget handles at least one type or is standalone.

  • subCategorystring | nulldefault null

    The sub-category in Add widget.

WidgetArtifact​

objectno other properties

Properties

  • dataobjectrequired

    The JSON Schema of the data the agent may fill in.

  • descriptionstringrequiredminLength 1maxLength 300

    When the agent shows the widget in the chat.

WidgetServer​

objectno other properties

Properties

  • proxiesstring[]maxItems 32

    The 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 32

    The 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.