feat: add shared node.invoke_native helper - #568
Merged
NeonDaniel merged 3 commits intoSep 9, 2026
Merged
Conversation
This was referenced Aug 17, 2026
NeonDaniel
reviewed
Sep 4, 2026
NeonDaniel
left a comment
Member
There was a problem hiding this comment.
Left some feedback on native_actions implementation. I think this generally makes sens, just a few details to work through
| error_message: str = "" | ||
|
|
||
|
|
||
| def invoke_native_action(skill, message: Message, action: NodeNativeAction, |
Member
There was a problem hiding this comment.
Can skill be annotated as an OVOSSkill? NeonSkill extends, so should be a safe annotation unless there is some import edge case you're trying to avoid
Contributor
Author
There was a problem hiding this comment.
No, because there's a message kwarg at play that isn't present in OVOSSkill
Capability-gate, emit, await-response, and settings (confirm_on_success, per_action_timeouts) logic for Node native actions, shared across every consuming skill's `if node:` branch.
…on names Address review feedback on the node.invoke_native helper: - Register the response handler before emitting the request, so a reply that lands before emit() returns is not missed. The waiter filters on action and session and unregisters itself once the wait ends. - Annotate `skill` as OVOSSkill. - Look up the spoken name of an action from a skill dialog file named after the NodeNativeAction value (e.g. launch_camera_app.dialog) so the `description` passed to dialogs is localizable. English remains the fallback when no such file exists. - Accept fractional per_action_timeouts values. Tests now drive a FakeBus that replies synchronously from inside the invoke emit, which the previous implementation timed out on.
mikejgray
force-pushed
the
FEAT_NodeInvokeNativeHelper
branch
from
September 4, 2026 21:14
6d82ada to
6eefb46
Compare
mikejgray
marked this pull request as ready for review
September 4, 2026 21:16
Drop the built-in English fallback text. Skills that call invoke_native_action are NeonGecko-controlled and must ship the native_action_* dialogs plus one <NodeNativeAction value>.dialog per action they invoke; the module docstring lists them. A missing file gets the standard OVOS behavior of speaking the key. Annotate `skill` as NeonSkill rather than OVOSSkill: the helper passes `message=` to speak_dialog, which only NeonSkill accepts.
NeonDaniel
approved these changes
Sep 9, 2026
NeonDaniel
left a comment
Member
There was a problem hiding this comment.
Implementation looks good to me; tests are passing and there is no backwards-compat. to consider
mikejgray
added a commit
to OscillateLabsLLC/skill-messaging
that referenced
this pull request
Sep 9, 2026
neon-utils~=1.12 does not resolve a prerelease, so the alpha published from NeonGeckoCom/neon-utils#568 needs an explicit floor.
mikejgray
added a commit
to OscillateLabsLLC/skill-launcher
that referenced
this pull request
Sep 9, 2026
neon-utils~=1.12 does not resolve a prerelease, so the alpha published from NeonGeckoCom/neon-utils#568 needs an explicit floor.
mikejgray
added a commit
to OscillateLabsLLC/skill-messaging
that referenced
this pull request
Sep 16, 2026
neon-utils~=1.12 does not resolve a prerelease, so the alpha published from NeonGeckoCom/neon-utils#568 needs an explicit floor.
NeonDaniel
pushed a commit
to NeonGeckoCom/skill-messaging
that referenced
this pull request
Sep 16, 2026
* feat: add node branch for single-shot sms/email compose Adds a Node capability-gated path at the top of handle_send_sms and handle_send_email, dispatching through neon-utils' shared invoke_native_action helper. Reuses recipient/subject/body already extracted by CMS_match_message_phrase; never enters the mobile draft-and-confirm state machine. Also adds test infrastructure for this skill (none existed before). * fix: add per-action dialogs and reword timeout dialog The neon-utils helper renders <NodeNativeAction value>.dialog for the spoken action name and has no built-in fallback text, so both actions this skill invokes need their own dialog file. Timeout wording matches the review suggestion on skill-launcher#54. * build: require neon-utils 1.14.2a5 for native_actions neon-utils~=1.12 does not resolve a prerelease, so the alpha published from NeonGeckoCom/neon-utils#568 needs an explicit floor. * build: require neon-data-models 0.0.3a2 for NodeNativeAction The enum this skill imports first shipped in the 0.0.3a2 prerelease; the ~=0.0,>=0.0.2 spec resolves the 0.0.2 stable, which does not have it. * ci: enable skill_unit_tests now that test/test_skill.py exists Requested in review. Intent and resource jobs stay off; this repo has no test_intents.yaml or test_resources.yaml yet. * build: request neon-utils[network] to match NeonCore's spec NeonCore requires neon-utils[network]>=1.14.1 without allowing prereleases, so pip resolved that node to 1.14.1 and it conflicted with this skill's 1.14.2a5 floor on the plain neon-utils node. Requesting the same extra lets one prerelease candidate satisfy both, as skill-launcher already does. The same conflict would break a Hub install. * build: sync skill.json requirement specs with requirements.txt Upstream regenerated skill.json in #29, which dropped this branch's neon-utils and neon-data-models floors. Match requirements.txt so the update_skill_json workflow has nothing to push. * test: list native action dialogs in test_resources.yaml The resource test file landed upstream in #29 after these dialogs were added; register them so the resource test covers them.
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
This PR adds
invoke_native_action, a shared helper for Node native actions. Any NeonSkill can call it from anif node:branch.The helper does four things:
node.invoke_nativerequest and waits for a reply matching the same action and session. The handler is removed once the wait ends.confirm_on_success(silent by default) andper_action_timeouts(per-action override, fractional seconds allowed).native_action_not_supported,native_action_success,native_action_timeoutandnative_action_errordialogs, plus one<NodeNativeAction value>.dialog(e.g.launch_camera_app.dialog) per action it invokes, holding the spoken name passed to the dialogs as{description}. The module docstring lists the keys and template variables. A missing file gets the standard OVOS behavior of speaking the key.Test plan
FakeBusthat replies from inside the invoke emit, so a response that arrives beforeemit()returns is exercised on every path. The earlier subscribe-after-emit implementation timed out on that case.CI note
Two
unit_testsjobs previously failed ontests/hana_util_tests.pywith a 504 fromhana.neonaibeta.com. This is a live network call to an external server, unrelated to this PR.