SIGN IN SIGN UP

refactor(inject): run scripts and workflows once, over four platform hooks

Each of the three backends carried its own run_workflow, dispatch_script, the three *_async thread wrappers and parse_shortcut — five functions, three times — and they had started to drift: the Linux workflow's PressKey step re-derived what press_combo already does, and its TypeText warning was worded differently from the one in execute.

inject.rs owns them now. A platform module supplies what actually differs — type_text, press_combo, run_apple_script and run_shell_command — and the shared code takes a script off the hook thread and walks a workflow's steps over those four. On Linux and Windows, type_text and run_apple_script are the same "not implemented" warnings as before, now spelled once each; macOS renames post_unicode and post_keycombo, and Windows post_custom_shortcut, to the hook names.

Guard: inject-workflow-owner flags any of the six runner functions inside a platform module (16 hits on the parent tree, 0 here).

Linux is not compiled on this host: its hooks are the existing functions with pub(super) plus two warn-only ones, hand-audited. The clippy (windows) proxy passes.
A
AprilNEA committed
9920b5e32e3074895989c13dddcff1fc6e3577a1
Parent: b2f70bc