Skip to content

Plugins

The form engine, MLform, ships twelve field kinds and the classifier and regressor reports, always available. A plugin adds a field kind or a report kind of your own to one organization. Once uploaded, the kind can be used in that organization’s schemas, and its forms draw it in Predict, reviews and public pages.

The Plugins catalog listing one report plugin, demo-summary.The Plugins catalog listing one report plugin, demo-summary.

Plugins (needs View plugins) lists the organization’s plugins. Filter All, Fields or Reports, search by file or kind, and sort by Latest updated or Name. Each entry shows its kind, whether it is a Field or Report plugin (or Invalid), who uploaded it and when. A new organization has no plugins.

A plugin is one TypeScript (.ts) file whose default export defines one kind. z (Zod), defineFieldKind and defineReportKind are provided; do not import them. The schema validates the kind’s options in the schema JSON.

demo-summary.ts
export default defineReportKind({
kind: "demo-summary",
schema: z.object({
kind: z.literal("demo-summary"),
label: z.string().optional(),
mappedTo: z.string().optional(),
}),
render: { content: ({ payload }) => ({ type: "text", value: String(payload) }) },
});

A field plugin uses defineFieldKind with kind, schema, a value (its default and how to normalize input) and render. The MLform guides to custom fields and custom reports describe the definitions.

  1. Choose Upload plugins (needs Manage plugins).
  2. Drop one or more .ts files. Each is compiled and checked in your browser and marked Ready or Invalid with the reason, for example a missing default export or an empty kind.
  3. Choose Upload all.

The kind is live for the organization at once: there is no activation step and no separate configuration, since each use is configured in the schema JSON. Two plugins with the same kind break the catalog; delete one.

To use the kind, write it in a schema change; the editor completes and validates plugin kinds like built-in ones. Reports from plugins get only the questionnaire step in reviews.

The runtime can explain a prediction of a scikit-learn DecisionTreeClassifier or DecisionTreeRegressor as the decision path it followed (Crystal Tree). No built-in report shows it: a report plugin requests it and draws it. On public pages the explanation is added when the model supports it and left out otherwise. Other estimators cannot be explained.

Delete in a plugin’s menu removes it. Schemas that use its kind can no longer draw those fields or reports. To update a plugin, delete it and upload the new file.