plugin docs: stdin/stdout uses type:"body" inside callbacks#4
Open
martinrode wants to merge 2 commits into
Open
plugin docs: stdin/stdout uses type:"body" inside callbacks#4martinrode wants to merge 2 commits into
martinrode wants to merge 2 commits into
Conversation
added 2 commits
June 9, 2026 12:18
…form) The "Format of manifest.yml" example showed `stdin.url: "%_input.url%"` and `stdout.url: "%_output.url%"` inside the `callbacks:` block. That syntax is correct for `extensions:` (which expose the input/output as HTTP endpoints via the on-the-fly /reader and /writer mechanisms) but not for callbacks. In the callback dispatch path the placeholder is not substituted, and fylr attempts to use the literal "%_input.url%" as the URL to GET stdin from. The resulting `parse "%_input.url%": invalid URL escape "%_i"` error is what a plugin developer building a `db_pre_save` callback hit during local testing. Update both `transition_db_pre_save` and `db_pre_save` examples to use `type: "body"` (matching the IUCN plugin's `manifest.yml` and the dot.yml cookbook). Add a hint near the start of the Callbacks section explicitly calling out the extension-vs-callback transport difference and quoting the actual error message so the next person who hits it can search for it. The `extensions:` example at the top of the file is left unchanged — that one was already correct.
The "Format of manifest.yml" callback examples referenced their script files by bare relative paths (`value: "set_comment.js"`). At runtime fylr's execserver runs the plugin process with cwd set to the per-job working directory under `tempDir` — *not* the plugin's directory — so the runtime can't find the script and fails with the language-specific "module not found" error (Node.js: `MODULE_NOT_FOUND` from `Module._load`; Python: `FileNotFoundError`; etc.). The fix is the `%_exec.pluginDir%` replacement, which already exists in `internal/server/execserver/exec.go:130` and is used in working real-world plugins (e.g. `easydb-custom-data-type-iucn/manifest.yml`: `value: "%_exec.pluginDir%/src/server/main-fylr.py"`). It was just never documented on the plugin doc page. Two changes: 1. Add `%_exec.pluginDir%` to the replacement table near the top of the page, with a one-line explanation of *why* you need it (so readers don't have to hit the runtime error first to learn the rule). 2. Update the two callback example blocks to prefix their script paths with `%_exec.pluginDir%/`, matching what an actually-working plugin looks like. The extension example at the top of the file already used absolute referencing for `%info.json%`, so the change there is just adding the prefix on the script-file `value`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Triggered by Andre Buhl hitting the documented form while writing his first server-side plugin against a Windows-local fylr instance.
The "Format of manifest.yml" example placed the extension-style URL form (
stdin.url: "%_input.url%"/stdout.url: "%_output.url%") inside bothcallbacks.transition_db_pre_saveandcallbacks.db_pre_saveexample blocks. That form works inextensions:because fylr exposes the input/output as on-the-fly HTTP endpoints there. In callbacks the same placeholder is not substituted — the execserver receives the literal string and fails to GET stdin from it:The two callback examples now use
type: "body", matching the IUCN plugin's manifest (easydb-custom-data-type-iucn/manifest.yml) and the fylr-internal cookbooks (resources/baseconfig/fas/cookbooks/dot.yml:14ff).Added a hint block near the top of the Callbacks section that:
The
extensions:example near the top of the file is unchanged — that one was already using the correct URL form.Test plan
callbacksYAML blocks now readtype: "body"for stdin and stdoutextensions:example was left intact🤖 Generated with Claude Code