You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: almanac/architecture/plugins/lifecycle-and-reload.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Plugin lifecycle and reload is the boundary between configured Husk plugin sourc
26
26
27
27
Configured plugins enter the registry through `add(name, path)`. The registry records the source path, marks the plugin `Pending`, snapshots source and metadata modification times, and then discovers metadata from the nearest matching external `red-plugin.toml` package before falling back to legacy adjacent `package.json` metadata or minimal single-file metadata [@registry][@package]. A metadata load failure quarantines that plugin immediately, but the registry still inserts minimal metadata so discovery of unrelated plugins can continue [@registry].
28
28
29
-
Activation checks are staged before Husk code runs. Dependencies must exist, required dependency versions must satisfy the dependent's semver requirements, and the compatibility range must match at least one Red host API version supported by this release [@registry]. Current packages express that range as `[plugin].red_api`; legacy `package.json` metadata expresses it as `red_api_version`[@package][@registry]. The compatibility guide documents the same policy for plugin packages: malformed or incompatible ranges quarantine the owner while editor startup and unrelated plugins continue [@api-doc].
29
+
Activation checks are staged before Husk code runs. Dependencies must exist, required dependency versions must satisfy the dependent's semver requirements, and the compatibility range must match at least one Red host API version supported by this release [@registry]. Current `red-plugin.toml`packages express that range as `[plugin].red_api`; legacy `package.json` metadata expresses it as `red_api_version`[@package][@registry]. Malformed or incompatible ranges quarantine the owner while editor startup and unrelated plugins continue[@registry]. The host-API guide records the broader pre-1.0 compatibility policy for supported ranges, patch releases, minor additions, and migration notes[@api-doc].
Copy file name to clipboardExpand all lines: almanac/architecture/plugins/red-host-api.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,6 @@ Many host actions translate directly into `PluginRequest` messages, such as pane
45
45
46
46
## Compatibility Policy
47
47
48
-
Current external package metadata declares the compatibility range as `[plugin].red_api` in `red-plugin.toml`; Red validates it during package load and then adapts the package into the registry metadata shape used for activation [@package][@registry]. Legacy adjacent `package.json` metadata may still declare `red_api_version` directly. The registry rejects malformed or incompatible ranges before activation, and it checks a requirement against every supported host API version because pre-1.0 caret ranges do not cross minor versions [@registry][@api-doc]. While Red remains pre-1.0, the documented policy is that patch releases fix behavior without intentional signature changes, minor releases may add or deprecate calls and fields, and removals or incompatible call changes require a host-API minor bump, a change manifest entry, and a migration note [@api-doc].
48
+
Current external package metadata declares the compatibility range as `[plugin].red_api` in `red-plugin.toml`; Red validates it during package load and then adapts the package into the registry metadata shape used for activation [@package][@registry]. Legacy adjacent `package.json` metadata may still declare `red_api_version` directly[@registry]. The registry rejects malformed or incompatible ranges before activation, and it checks a requirement against every supported host API version because pre-1.0 caret ranges do not cross minor versions [@registry]. The host-API guide still describes legacy metadata syntax, so use code for current package fields and use the guide for compatibility intent: patch releases fix behavior without intentional signature changes, minor releases may add or deprecate calls and fields, and removals or incompatible call changes require a host-API minor bump, a change manifest entry, and a migration note[@package][@api-doc].
49
49
50
50
Callback-scoped pickers and composers illustrate how compatibility shapes dispatch. The API guide keeps legacy numeric picker and composer calls available for compatibility while directing new plugins to handler-record APIs [@api-doc]. For the current version, accepted compatibility targets, and introduced-call inventory, use [Plugin host API](../../reference/plugins/host-api). For lifecycle consequences of incompatible calls, use [Plugin lifecycle and reload](lifecycle-and-reload).
Copy file name to clipboardExpand all lines: almanac/guides/plugins/write-a-husk-plugin.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ sources:
29
29
path: src/plugin/registry.rs
30
30
---
31
31
32
-
Use this guide when adding or revising a Red plugin written in Husk. A complete plugin has Husk source that declares commands or events, optional `red-plugin.toml` package metadata that declares compatibility, host calls that match the current Red API, and any process permissions needed by its runtime behavior [@system-doc][@external-doc][@api-doc]. By the end, the plugin should load through Red's plugin lifecycle, expose only the resources it needs, and pass the same validation commands used for bundled plugin work.
32
+
Use this guide when adding or revising a Red plugin written in Husk. A complete plugin has Husk source that declares commands or events, optional `red-plugin.toml` package metadata that declares compatibility, host calls that match the current Red API, and any process permissions needed by its runtime behavior [@system-doc][@external-doc][@schema]. By the end, the plugin should load through Red's plugin lifecycle, expose only the resources it needs, and pass the same validation commands used for bundled plugin work.
|`src/plugin/registry.rs`| Runtime compatibility gate; `RED_HOST_API_VERSION` is `0.17.0`, and `0.4.0`, `0.6.0`, `0.7.0`, `0.8.0`, `0.9.0`, `0.10.0`, `0.11.0`, `0.12.0`, `0.14.0`, and `0.16.0` remain accepted compatibility targets for existing packages [@registry]. |
35
35
|`src/plugin/package.rs`| Current `red-plugin.toml` schema, package validation, and package-to-registry metadata adaptation [@package]. |
36
-
|`docs/PLUGIN_API.md`| Human compatibility guide, migration notes, and behavioral descriptions for plugin authors[@api-doc]. |
36
+
|`docs/PLUGIN_API.md`| Human compatibility guide, migration notes, and behavioral descriptions for plugin authors; it currently names legacy `red_api_version` package syntax rather than current `red-plugin.toml` fields [@api-doc][@package]. |
37
37
|`docs/plugin_api_changes.json`| Versioned change manifest that records introduced symbols and migration note anchors through `0.17.0`[@changes]. |
38
38
39
39
Use code as the authority for runtime behavior and the schema as the authority for the public host call inventory. The prose guide is useful for compatibility intent and migration guidance, but when its stated host version or target range conflicts with `src/plugin/host_api.json` or `src/plugin/registry.rs`, use the schema and registry until the guide is refreshed [@schema][@registry][@api-doc].
@@ -63,7 +63,7 @@ The schema's call list is the exact lookup source for current signatures. Exampl
63
63
64
64
## Compatibility Rules
65
65
66
-
Current external packages declare a semver range as `[plugin].red_api` in `red-plugin.toml`; Red validates that range when loading the package and adapts it into the registry's legacy `red_api_version` metadata field before activation [@package][@registry]. Older adjacent `package.json` metadata can still provide `red_api_version` directly, and malformed or incompatible ranges quarantine only the owner while unrelated plugins continue [@registry][@api-doc]. The registry accepts `0.4.0`, `0.6.0`, `0.7.0`, `0.8.0`, `0.9.0`, `0.10.0`, `0.11.0`, `0.12.0`, `0.14.0`, `0.16.0`, and the current `0.17.0` host API version, so existing packages can remain on those supported minors while new packages should target `^0.17.0` unless they intentionally avoid newer host calls [@registry][@api-doc]. Because pre-1.0 caret ranges do not cross minor versions, compatibility checks test the declared range against every supported host API version instead of only the current version [@registry]. The documented pre-1.0 policy is:
66
+
Current external packages declare a semver range as `[plugin].red_api` in `red-plugin.toml`; Red validates that range when loading the package and adapts it into the registry's legacy `red_api_version` metadata field before activation [@package] [@registry]. Older adjacent `package.json` metadata can still provide `red_api_version` directly, and malformed or incompatible ranges quarantine only the owner while unrelated plugins continue [@registry]. The registry accepts `0.4.0`, `0.6.0`, `0.7.0`, `0.8.0`, `0.9.0`, `0.10.0`, `0.11.0`, `0.12.0`, `0.14.0`, `0.16.0`, and the current `0.17.0` host API version, so existing packages can remain on those supported minors while new packages should target `[plugin].red_api = "^0.17.0"` unless they intentionally avoid newer host calls [@schema] [@registry]. `docs/PLUGIN_API.md` still names legacy `red_api_version`, so treat it as compatibility and migration guidance rather than the current manifest-field authority [@api-doc] [@package]. Because pre-1.0 caret ranges do not cross minor versions, compatibility checks test the declared range against every supported host API version instead of only the current version [@registry]. The documented pre-1.0 policy is:
0 commit comments