From c91348e68b9e438159ffecc3e26bc6f971e0fa2a Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Mon, 15 Jun 2026 00:49:58 +0300 Subject: fix: require plugin min herdr version --- docs/next/website/src/content/docs/cli-reference.mdx | 2 +- docs/next/website/src/content/docs/plugins.mdx | 10 ++++++++-- docs/next/website/src/content/docs/socket-api.mdx | 4 ++++ 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'docs/next/website/src') diff --git a/docs/next/website/src/content/docs/cli-reference.mdx b/docs/next/website/src/content/docs/cli-reference.mdx index 106823b3..35255393 100644 --- a/docs/next/website/src/content/docs/cli-reference.mdx +++ b/docs/next/website/src/content/docs/cli-reference.mdx @@ -282,7 +282,7 @@ herdr plugin enable herdr plugin disable ``` -`plugin install` accepts GitHub shorthand only, such as `ogulcancelik/herdr-plugin-examples/worktree-bootstrap`. It uses `git`, shows a trust preview in interactive terminals, runs supported manifest build commands, and stores GitHub installs in a Herdr-managed directory. Use `--yes` for noninteractive installs. Reinstalling a GitHub-managed plugin replaces that managed checkout. Installing over a locally linked plugin is refused. `plugin list` is human-readable by default; pass `--json` for the raw API response. +`plugin install` accepts GitHub shorthand only, such as `ogulcancelik/herdr-plugin-examples/worktree-bootstrap`. It uses `git`, shows a trust preview in interactive terminals, runs supported manifest build commands, and stores GitHub installs in a Herdr-managed directory. Use `--yes` for noninteractive installs. Reinstalling a GitHub-managed plugin replaces that managed checkout. Installing over a locally linked plugin is refused. Plugin manifests must declare `min_herdr_version`; install and link fail when the plugin requires a newer Herdr binary. `plugin list` is human-readable by default; pass `--json` for the raw API response. Local development: diff --git a/docs/next/website/src/content/docs/plugins.mdx b/docs/next/website/src/content/docs/plugins.mdx index cf5b4ff2..e892fd01 100644 --- a/docs/next/website/src/content/docs/plugins.mdx +++ b/docs/next/website/src/content/docs/plugins.mdx @@ -42,6 +42,7 @@ Herdr can run. id = "example.layout" name = "Layout" version = "0.1.0" +min_herdr_version = "0.6.10" description = "Apply project layouts" platforms = ["linux", "macos", "windows"] @@ -75,8 +76,12 @@ pattern = "^https://github\\.com/[^/]+/[^/]+/(issues|pull)/[0-9]+$" action = "apply" ``` -Top-level `id`, `name`, and `version` are required. `description` is optional. -Plugin ids may use ASCII letters, digits, dot, colon, underscore, and hyphen. +Top-level `id`, `name`, `version`, and `min_herdr_version` are required. +Set `min_herdr_version` to the oldest Herdr version that supports the plugin +APIs, event names, and manifest fields your plugin uses. Herdr refuses to link +or install a plugin when its minimum version is newer than the current binary. +`description` is optional. Plugin ids may use ASCII letters, digits, dot, +colon, underscore, and hyphen. Action ids, pane ids, and link handler ids are local ids inside the plugin. They may use ASCII letters, digits, colon, underscore, and hyphen, but not @@ -107,6 +112,7 @@ my-plugin/ id = "example.workspace-tools" name = "Workspace Tools" version = "0.1.0" +min_herdr_version = "0.6.10" description = "Small workspace helpers" platforms = ["linux", "macos", "windows"] diff --git a/docs/next/website/src/content/docs/socket-api.mdx b/docs/next/website/src/content/docs/socket-api.mdx index 2bfe41df..0331d560 100644 --- a/docs/next/website/src/content/docs/socket-api.mdx +++ b/docs/next/website/src/content/docs/socket-api.mdx @@ -323,6 +323,7 @@ manifest path. The manifest shape is: id = "example.worktree-bootstrap" name = "Worktree Bootstrap" version = "0.1.0" +min_herdr_version = "0.6.10" description = "Prepare new worktrees" platforms = ["linux", "macos", "windows"] @@ -352,6 +353,9 @@ pattern = "^https://github\\.com/[^/]+/[^/]+/(issues|pull)/[0-9]+$" action = "bootstrap" ``` +`min_herdr_version` is required. The server refuses to link a plugin when the +field is missing, invalid, or newer than the running Herdr binary. + Declare `platforms` at the top level with the OS identifiers (`linux`, `macos`, `windows`) your plugin supports. Omitting `platforms` is allowed for local development — `plugin.link` succeeds but the response includes a warning. -- cgit v1.2.3