Repository navigation
Stop the trigger offering itself as an AI tool - #10
Merged
Merged
Conversation
n8n inverted this rule. When these nodes were written, omitting `usableAsTool` was a `node-usable-as-tool` error, so the trigger set it and carried a comment explaining that the resulting `hookdeckEventGatewayTriggerTool` entry was noise we had no way to opt out of. As of @n8n/eslint-plugin-community-nodes 0.29.0 — shipped in @n8n/scan-community-package 0.32.0 — setting it on a trigger is the error, and the rule no longer asks a trigger for the property at all. The repo could not see this. `^0.31.0` on a 0.x version cannot reach 0.32.0, so `npm run scan` kept passing against the scanner that had the bug while the published package would fail n8n's actual review. Bumping the scanner reproduces it at 178:3; removing the property clears it. The action node keeps `usableAsTool: true`. It is the one an agent should be calling, and the scanner agrees. Running n8n 2.35.6's own createAiTools() over the built descriptions confirms the behaviour either way: with the property it generates hookdeckEventGatewayTool and hookdeckEventGatewayTriggerTool; without it, only the former. That is the whole runtime delta — diffing the loaded description objects across the two builds shows exactly one line removed and nothing else moved. @n8n/node-cli goes to ^0.44.5 in the same change. Its own dist is unchanged from 0.42.2; what matters is that it pulls the same plugin 0.29.0, so `npm run lint` and `npm run scan` now enforce one rule set rather than two. Also fixes CONTRIBUTING.md, which still documented `npm run test:integration` after #9 renamed it to `test:live`, and notes the trigger exception in .agents/nodes.md, whose upstream copy has not caught up with the rule. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtT85W8PPr2S8RW2WhCtpi
`test/live` drives `hookdeck listen`, which forwards from whichever project the CLI is logged into. Pinning it per-checkout with `hookdeck ci --local` is the right answer, but that writes a project API key to .hookdeck/config.toml in the working tree, and nothing was ignoring it. This repo already has a committed .env in its history. Adding the ignore before the file can exist is cheaper than the alternative. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtT85W8PPr2S8RW2WhCtpi
This was referenced Aug 21, 2026
Review caught the comment this PR added being imprecise in the same way as the
one it replaced. `node-usable-as-tool` reports only the literal `true`; setting
`usableAsTool: false`, or the `{ replacements }` object form, is not an error.
Both the trigger comment and the test's assertion message said otherwise.
The test's use of `in` rather than `=== undefined` now carries the reason that
actually justifies it: n8n generates the tool variant for anything truthy, so
the object form passes the scan and still adds the entry. Verified against
n8n 2.35.6's createAiTools — `{ replacements }` produces `fakeTriggerTool`.
.env.example still pointed at `npm run test:integration`. The earlier sweep
grepped only *.md and *.yml, which is exactly the file a contributor opens first
when setting the live suite up.
.agents/nodes.md repeated upstream's "set to `false`" for binary-data nodes.
n8n-workflow types the property `true | UsableAsToolDescription`, so `false`
does not typecheck — and that loose wording is what both corrected comments
tripped over.
CHANGELOG promoted to 0.2.0, sections in Keep a Changelog order, and the
versioning rationale cut to the sentence a user can act on. README's verified-on
line moves to the n8n this was exercised against.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XtT85W8PPr2S8RW2WhCtpi
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.
What changed and why
n8n inverted the
usableAsToolrule for trigger nodes. When this package waswritten, omitting the property was a
node-usable-as-toolerror, so thetrigger set it. As of
@n8n/eslint-plugin-community-nodes0.29.0 — shipped in@n8n/scan-community-package0.32.0 — setting it on a trigger is the error,and the rule no longer asks a trigger for the property at all.
The repo could not see this:
^0.31.0on a0.xversion cannot reach0.32.0,so
npm run scankept passing against the scanner that had the old rule, whilethe published
0.1.0would fail n8n's actual review.@n8n/scan-community-package^0.31.0→^0.32.0@n8n/node-cli^0.42.2→^0.44.5usableAsTool: truefromHookdeckEventGatewayTriggerusableAsTool: trueonHookdeckEventGateway(the action node) — correct there, and the scanner agreesCHANGELOG.md## [Unreleased]entry.agents/nodes.md: noted the trigger exceptionScan output, before and after — both against 0.32.0
Before (property still present):
After:
For completeness, the same tree on the old
0.31.0scanner passed — which isexactly the problem this fixes.
Changelogs of the two bumps
Neither package ships a
CHANGELOG.md, so I diffed the published tarballs.@n8n/scan-community-package0.31.0 → 0.32.0 — its only consumer-visible dependencychange is
@n8n/eslint-plugin-community-nodes0.28.0→0.29.0(plus a@n8n/vitest-configdevDependency bump, irrelevant here). In that plugin bump, two rule files and one shared
util changed, and no rules were added, removed, or re-severitied —
dist/plugin.js,which carries the configs and severities, is byte-identical:
rules/node-usable-as-tool.jstruerules/trigger-node-conventions.jsname.endsWith('Trigger')check became a call to the newisTriggerNodeClass, which is that same check. Behaviour unchangedutils/ast-utils.jsisTriggerNodeClass/hasTriggerGroup/isTriggerNode. Onlynode-usable-as-tooluses the group-awareisTriggerNode@n8n/node-cli0.42.2 → 0.44.5 — its owndist/is byte-identical apart frombuild.tsbuildinfo. The real effect is transitive: the bundled plugin goes0.27.0→
0.29.0, sonpm run lintandnpm run scannow run the same rule set insteadof two different ones. (
@n8n/ai-node-sdk0.23.2→0.25.5is used byn8n-node devscaffolding, not by
buildorlint.)0.44.5is npm'slatest/stable;0.45.xexists but is tagged
beta, and it bundles the same plugin0.29.0.The lockfile diff is large (612 insertions) but entirely dev-tree churn: the set of
non-dev packages is unchanged, and the package declares no runtime
dependencies,so nothing that ships is affected.
Verification
Full pre-PR checklist, all passing:
npm run lint✖ 2 problems (0 errors, 2 warnings)— both the acceptedicon-prefer-themed-variantswarningsnpm run build✓ Build successfulnpm run scan✅ Passed n8n community package verification checksnode scripts/verify-package-load.mjs✅ Package loads the way n8n loads it (29 checks)node --test test/unit.test.mjstests 107 · pass 107 · fail 0Beyond the checklist
The description object is otherwise byte-identical. I built the tree with and
without the change, instantiated both node classes, and diffed the full loaded
descriptionobjects pluswebhookMethods,methodsandwebhook/execute.The entire delta across 2,912 lines is one line:
"outputs": [ "main" ], - "usableAsTool": true, "credentials": [The trigger still registers (
verify-package-load.mjslists it), still has all threewebhook methods (
checkExists,create,delete) and still haslistSearch.searchSources.The behavioural change, run through n8n's own code. Rather than infer it, I called
n8n 2.35.6's shipped
createAiTools()(n8n/dist/tool-generation/ai-tools.js) over thereal built descriptions:
That also confirms the type name the changelog and the old comment claimed
(
hookdeckEventGatewayTriggerTool), which was previously unverified.Mutation check. Re-adding
usableAsTool: truemakes both the new unit test andnpm run scanfail, so neither guard is vacuous.New test. One test,
only the action node offers itself as an AI tool. It assertsabsence via
'usableAsTool' in descriptionrather than=== undefined, because the rulerejects the property being set, and
falseis not what the rule's docs show as correct.It is there because neither direction is visible in a build or a delivery test: re-adding
it fails n8n verification, and dropping it from the action node silently removes that node
from every agent's tool picker.
What I could NOT test
The live Hookdeck suites — ran and passed in CI. Locally they failed: with the
maintainer's go-ahead I ran
npm run test:liveagainst the key in the gitignored.envand every test failed immediately with
HTTP 401 UnauthorizedonGET /sources. Adirect call with that key and the same
Bearerscheme the credential uses also 401s, sothat local key has expired or been rotated — nothing to do with this change.
CI has a valid repository secret, and the
integrationjob on this PR ran the suites forreal against the live API:
The 3 skips are pre-existing environmental ones, unrelated to this PR: delivery groups
are not enabled for this organization, the Hookdeck CLI is not installed, and the
Stripe CLI is not logged in. The middle one matters for the checklist below — "real
deliveries into the node" is skipped in CI, so an actual inbound delivery is still
unverified by any automated run.
Worth fixing separately: the local
.envkey is dead, sonpm run test:livecurrentlyfails for anyone using it.
Checks 1 and 3 — now verified in a real running editor. n8n 2.35.6, Node 22.23.2,
this package linked through
~/.n8n/custom.Querying
/types/nodes.json— the feed the node panel and the AI tool picker both read —from the logged-in editor returned 983 node types, of which exactly three are Hookdeck:
CUSTOM.hookdeckEventGatewaytransformmainCUSTOM.hookdeckEventGatewayTriggertriggermainCUSTOM.hookdeckEventGatewayTooltransformai_toolThere is no
hookdeckEventGatewayTriggerTool. That is the change this PR makes,confirmed against a live registry rather than inferred. The node panel also lists the
package correctly — "Hookdeck Event Gateway" with Triggers (1) and Actions (30) —
and the trigger places on canvas.
Checks 4 and 5 — now verified against live Hookdeck traffic. Re-ran
npm run test:livewith a valid key: 46 tests, 43 pass, 2 fail, 1 skipped. The delivery suite — the one CI
skips because it has no Hookdeck CLI — passed in full:
That covers the documented output shape (check 4) and the pause/resume path (check 5)
against real traffic, which is stronger than driving it by hand in the editor.
The 2 failures and 1 skip are environmental, not this change:
Stripe delivers a signed event that Hookdeck verifies— the Stripe CLI's key hasexpired:
stripe webhook_endpoints create … The API key provided has expired. Obtain a new key from the Dashboard or run 'stripe login'. Not an assertion about nodebehaviour. CI skips this suite entirely.
delivery groups are provisioned with key, limit and period— skipped, delivery groupsare not enabled for this organization. Same as CI.
Check 2 (credential test) — verified, except for the green tick itself. Rather than
retype the request, I loaded the shipped
HookdeckEventGatewayApiclass fromdistandfired its own
test.requestresolved through its ownauthenticateexpression — the sameinputs n8n uses:
The negative control is the point: a credential test that accepts anything would pass a
positive-only check while protecting nobody. What remains unverified is only the UI
affordance — clicking Save and seeing the tick — since that needs a key typed into the
form. The credential file is untouched by this PR.
Restart n8n after any rebuild — descriptions are read once at startup.
A CLI version floor this suite depends on, undocumented
The delivery suite first failed all five subtests. Cause:
hookdeck listenforwards fromwhichever project the CLI is logged into, and the local CLI was on an unrelated Outpost
project — precisely the failure
describeCliSetup()in the trigger warns about:Pinning per-checkout with
hookdeck ci --localis the right fix, but on CLI < 2.5.0--localalso rewrites the global config (hookdeck-cli#332,fixed in 2.5.0). On 2.0.2 it silently switched the machine's active project. All results
above are from CLI 2.5.0.
Hence the second commit here:
.hookdeck/is now gitignored, because--localwrites aproject API key into the working tree and nothing was ignoring it — in a repo that already
has a committed
.envin its history.Version recommendation
0.2.0.The tension is worth stating once so nobody re-derives it.
CONTRIBUTING.md's table callsa removed node type MAJOR, and
hookdeckEventGatewayTriggerToolgenuinely doesdisappear — verified above. But nobody can hold a working workflow that depends on it: it
was a tool that could not be invoked. Pre-1.0 both readings land on
0.2.0anyway, soit costs nothing either way. Recorded in the changelog entry rather than left implicit.
Per
CONTRIBUTING.md, no version is set in this PR — the tag is the version.Things that contradict the brief, or are worth a second look
The scanner's "ignores inlineeslint-disable" claim was taken on trust.Verified during review:
@n8n/scan-community-package/scanner/scanner.mjssetsallowInlineConfig: false. A suppressed error really would be a hidden failure..agents/nodes.mdwas byte-identical to@n8n/node-cli's shipped template, andupstream still carries the stale guidance even at
0.44.5. So n8n's own scaffoldingdoc contradicts n8n's own scanner rule. My edit is a deliberate local divergence and
says so inline; it will conflict if the template is ever re-synced. Worth reporting
upstream.
Out of scope, fixed anyway (flagging explicitly):
CONTRIBUTING.mddocumentednpm run test:integration, which has not existed since Consolidate the integration suite under test/live #9 renamed it totest:live.One line.
.github/workflows/integration.ymlwas already correct.CHANGELOG.md's0.1.0 entry also names
test:integration, but that was accurate at 0.1.0, so perKeep a Changelog I left the historical entry alone.
CHANGELOG.md0.1.0 says "Both nodes are usable as agent tools." True when 0.1.0shipped, false now. Left as-is for the same reason — the Unreleased entry supersedes it.
README needed no change. Its two "agent tool" mentions (lines 424, 500) are both
about the action node and remain correct.
README.mdalso cites end-to-endverification on n8n 2.34.4; I exercised n8n 2.35.6.
Name collision in the node panel, worth knowing about. With this package linked,
the editor's "More from the community" section also advertises
n8n-nodes-hookdeckv1.0.3 — a separate third-party package ("n8n community node for Hookdeck", author
jonathan@joffcom.net,github.com/Joffcom/n8n-nodes-hookdeck). It renders as"Hookdeck" and "Hookdeck Tool" directly beneath ours in the panel. Nothing to do
with this PR, and it briefly misled me — I first read "Hookdeck Tool" as our own tool
node. Flagging it because users searching "hookdeck" will see both, and because the
author appears to be the same person named as n8n's community engineer for the
verification process. Worth confirming before submission.
test/liveleaks destinations. Snapshotting the project either side of a run:sources 8 → 8 and connections 9 → 9 (clean), but destinations 27 → 39.
cleanUpRunfilters on
ownedByThisRun, which matchesn8n-live-<run>-…,cli-n8n-live-<run>-…and
n8n-<run>-<node>— but the node names destinationsn8n-dest-<run>-<node>,which matches none of them, so every node-provisioned destination survives the sweep.
This is the same bug the harness comment already records for connections ("The third
was missing at first, so every node-provisioned connection survived cleanup") — fixed
there, missed for destinations. All 39 in the project are
n8n-dest-*. Not fixed here:unrelated to this PR and it touches deletion logic in a shared project.
stripeReady()checks presence, not validity. It gates on Stripe config existing,so an expired Stripe key turns what should be a clean skip into a red failure — the
same shape as the ingest bug this repo already fixed on the Hookdeck side.
Two things I changed on your machine, both reported at the time: I restarted the
n8n that had been running since Aug 12 (approved; it had no workflows or credentials),
and I had to delete and let npm repopulate the
~/.npm/_npx/83f51bd5dfda7e85cacheafter an interrupted install corrupted it.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XtT85W8PPr2S8RW2WhCtpi