fix(qoder): expand ${QODER_PLUGIN_ROOT} in plugin hook commands#598
Open
lingbin wants to merge 1 commit into
Open
fix(qoder): expand ${QODER_PLUGIN_ROOT} in plugin hook commands#598lingbin wants to merge 1 commit into
lingbin wants to merge 1 commit into
Conversation
.qoder-plugin/plugin.json loads hooks/qoder-hooks.json as a live plugin
hook config, but the two commands contained the literal placeholder
PONYTAIL_DIR. Qoder never expands PONYTAIL_DIR, so it ran the string
verbatim:
node <cwd>/PONYTAIL_DIR/hooks/ponytail-mode-tracker.js
Error: Cannot find module '...MODULE_NOT_FOUND'
surfacing in Qoder as a non-blocking UserPromptSubmit hook error on
every prompt, with the ponytail ruleset never injected -- a functional
silent failure despite the non-blocking status.
Qoder expands ${QODER_PLUGIN_ROOT} (the plugin install root) in plugin
hook commands at runtime [1], the same mechanism the sibling
hooks/claude-codex-hooks.json already uses via ${CLAUDE_PLUGIN_ROOT}.
Swap the placeholder for that variable in both commands and reword the
now-stale _comment: the file is loaded live by the plugin manifest, not
copied into settings.json as a template.
commandWindows / timeout / statusMessage from claude-codex-hooks.json
are intentionally not mirrored: the Qoder plugin-hook docs document only
"type" and "command" hook keys [1], so adding the rest would be
unverified speculation.
Verified: with QODER_PLUGIN_ROOT set, both hook scripts exit 0 and the
mode-tracker emits the "PONYTAIL MODE ACTIVE -- level: full" banner plus
the full ruleset (its isQoder double-duty branch), restoring ponytail
behavior under Qoder.
[1] https://docs.qoder.com/en/cli/plugins#writing-plugin-hooks
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.
.qoder-plugin/plugin.json loads hooks/qoder-hooks.json as a live plugin
hook config, but the two commands contained the literal placeholder
PONYTAIL_DIR. Qoder never expands PONYTAIL_DIR, so it ran the string
verbatim:
node /PONYTAIL_DIR/hooks/ponytail-mode-tracker.js
Error: Cannot find module '...MODULE_NOT_FOUND'
surfacing in Qoder as a non-blocking UserPromptSubmit hook error on
every prompt, with the ponytail ruleset never injected -- a functional
silent failure despite the non-blocking status.
Qoder expands ${QODER_PLUGIN_ROOT} (the plugin install root) in plugin
hook commands at runtime [1], the same mechanism the sibling
hooks/claude-codex-hooks.json already uses via ${CLAUDE_PLUGIN_ROOT}.
Swap the placeholder for that variable in both commands and reword the
now-stale _comment: the file is loaded live by the plugin manifest, not
copied into settings.json as a template.
commandWindows / timeout / statusMessage from claude-codex-hooks.json
are intentionally not mirrored: the Qoder plugin-hook docs document only
"type" and "command" hook keys [1], so adding the rest would be
unverified speculation.
Verified: with QODER_PLUGIN_ROOT set, both hook scripts exit 0 and the
mode-tracker emits the "PONYTAIL MODE ACTIVE -- level: full" banner plus
the full ruleset (its isQoder double-duty branch), restoring ponytail
behavior under Qoder.
[1] https://docs.qoder.com/en/cli/plugins#writing-plugin-hooks