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
{{ message }}
Repository navigation
Inject automation: inject-message automation and runtime endpoint #437
(prototype done; remaining work is review, polish and the release)
Add the editor automation automation/inject-message ({ id, msg? }) and the runtime route POST /nr-assistant/inject. Together they inject a message into a deployed node.
Editor checks: refuse unknown nodes, nodes with no input port, disabled nodes or tabs, nodes inside a subflow definition, and nodes with undeployed changes. Return success: false with a reason.
Runtime:
Requires write permission.
Re-checks AI Flow Deploy on every call through the shared getAutoDeployPolicy(), which fails closed.
Looks up the node with RED.nodes.getNode, replaces _msgid, calls node.receive(), and returns { injected, msgid }.
Refusal code: INJECT_NOT_ALLOWED when the policy is off.
Audit: RED.log.audit({ event: 'nr-assistant.inject', node, type, name, z }, req). Add name and z to the current prototype so forge can show details.
Tests: unit tests for the editor action and the route.
Acceptance criteria:
Injecting into a deployed function node shows up in the downstream debug with the returned msgid.
With AI Flow Deploy off, the route returns injected: false, code: INJECT_NOT_ALLOWED, and nothing is delivered.
Activity