refactor: replace WASM plugin system with static DI#12
Merged
Conversation
Replace the WASM plugin indirection with a native DockerRunner that calls Bollard directly through RunContext. Merges the orchestration flow from hm-plugin-docker (cache decision, image resolution, container lifecycle) with the host-function implementations from docker_host_fns (pull, extract, exec with StepLogWriter streaming, commit, cleanup). Key design changes from the plugin system: - StepLogWriter stores step_id + Arc<EventBus> instead of reading globals - All long operations (pull, extract, exec) race against CancellationToken - Container cleanup is unconditional via split run_in_container pattern - BTreeMap<String,String> env converted to Vec<"K=V"> at call boundary
Rewire the dataflow scheduler to use RunnerRegistry + OutputRenderer instead of the WASM PluginRegistry. Remove OrchestratorState from the scheduler (host_fns still use it), replace plugin pool dispatch with RunContext + StepRunner::execute, and simplify output_subscriber to a direct renderer loop. Move the ctrl-c signal handler to orchestrator::signal. local.rs now builds the RunnerRegistry and renderer at the call site.
Remove the entire Extism/WASM plugin infrastructure: - Delete plugin module (host, host_fns, pool, registry, embedded, etc.) - Delete WASM plugin crates (sdk, docker, output-human, output-json, fixtures) - Delete build.rs (WASM cross-compilation) - Delete docker_host_fns.rs and state.rs (host-function indirection) - Delete External CLI variant and external.rs dispatcher - Simplify cli/plugin.rs to list static runners - Simplify cli/version.rs (no more plugin API version) - Remove extism dependency from workspace - Remove cloud crate from workspace temporarily (pending migration) - Delete plugin-specific tests and cloud CLI tests - Fix clippy nursery warnings in output renderers
Convert hm-plugin-cloud from an Extism cdylib WASM plugin to a regular Rust library crate with direct dependencies: - Replace extism-pdk HTTP with reqwest (async) - Replace host::keyring_* with file-backed credentials.toml - Replace host::kv_* with file-backed cloud-state.json - Replace host::spawn_loopback with tokio TcpListener - Replace host::write_stdout/stderr with print!/eprint! - Replace host::browser_open with webbrowser crate - Replace host::tty_prompt with dialoguer crate - Make all verb functions async - Replace PluginError with anyhow throughout - Wire CloudCommand into hm binary's CLI enum - Remove extism-pdk and hm-plugin-sdk dependencies
- Delete protocol modules: error, hook, host_abi, manifest, subcommand - Remove HM_PLUGIN_API_VERSION constant - Remove Plugin* error variants from HmError (PluginLoad, PluginManifest, PluginMissingHostFn, PluginPanic, PluginTimeout, PluginConflict, UnknownVerb) and their exit code categories - Delete schema snapshot tests and insta dev-dependency - Remove unused semver, thiserror deps from protocol crate - Remove unused hm-plugin-protocol, semver deps from cloud crate - Update CLAUDE.md to reflect static DI architecture
markovejnovic
added a commit
that referenced
this pull request
May 25, 2026
…ss engines All four workflow files (ci, examples, release) no longer reference wasm32-wasip1 or build embedded WASM plugins -- those were removed in PR #12. Integration job now installs croniter + python-dateutil for the Python DSL subprocess engine. CLAUDE.md files updated to document the new DSL engine architecture (subprocess-based, no WASM).
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.
No description provided.