Declare plugin settings in the manifest, resolve them from the environment #88

Merged
lilleman merged 2 commits from plugin-settings into main 2026-08-23 16:26:17 +02:00
Owner

A plugin declares the configuration it accepts as settings; the host resolves one PLUGIN_SETTING_<ID>_<KEY> variable per key at boot and hands the typed values to onBoot.

Refused at discovery: a malformed declaration, or required alongside default. Refused at boot: a missing required value or one that will not coerce. Warned: a stray PLUGIN_SETTING_ variable, and settings declared without an onBoot to receive them.

A secret reaches the plugin but never a log, an error or the catalog. Read-only admin screen at /admin/plugin-settings names the variable that sets each key and where the value came from.

Contract change, so HOST_API_VERSION goes 0.1.0 → 0.2.0 — pre-1.0 the minor is the breaking slot, so every plugin's apiVersion literal moves with it. The scheduling example's SCHEDULING_UPSTREAM becomes PLUGIN_SETTING_SCHEDULING_UPSTREAM.

A plugin declares the configuration it accepts as `settings`; the host resolves one `PLUGIN_SETTING_<ID>_<KEY>` variable per key at boot and hands the typed values to `onBoot`. Refused at discovery: a malformed declaration, or `required` alongside `default`. Refused at boot: a missing required value or one that will not coerce. Warned: a stray `PLUGIN_SETTING_` variable, and settings declared without an `onBoot` to receive them. A `secret` reaches the plugin but never a log, an error or the catalog. Read-only admin screen at `/admin/plugin-settings` names the variable that sets each key and where the value came from. Contract change, so `HOST_API_VERSION` goes 0.1.0 → 0.2.0 — pre-1.0 the minor is the breaking slot, so every plugin's `apiVersion` literal moves with it. The scheduling example's `SCHEDULING_UPSTREAM` becomes `PLUGIN_SETTING_SCHEDULING_UPSTREAM`.
lilleman added 1 commit 2026-08-23 13:17:21 +02:00
lilleman added 1 commit 2026-08-23 16:23:15 +02:00
Merge branch 'main' into plugin-settings
CI / full-gate (push) Successful in 2m52s
Mirror / github-mirror (push) Successful in 6s
Release / retag-image (push) Successful in 16s
Release / publish-overview (push) Successful in 6s
549d1313e2
lilleman merged commit 549d1313e2 into main 2026-08-23 16:26:17 +02:00
lilleman deleted branch plugin-settings 2026-08-23 16:26:17 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: larvit/plainpages#88