Add plugin-tee and introduce breaking WIT changes for enhanced plugin capabilities #11
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.
This PR introduces the new
plugin-teeplugin and makes necessary breaking changes to the WebAssembly Interface Types (WIT) contracts to enable enhanced plugin functionality.🆕 New Features
plugin-tee
A new Rust-based plugin that implements the Unix
teecommand functionality:$0)-aor--appendflags to append content to existing filesechoandcatin the REPL workflowThe plugin demonstrates the new plugin API capabilities by accessing REPL variables through the enhanced host interface.
1. WIT Contract Changes (plugin-api.wit)
host-state-plugininterface withget-repl-varfunction$0for previous command output)2. WIT Contract Changes (host-api.wit)
set-repl-varfunction fromhost-stateinterface🔧 Technical Implementation
Arc<Mutex<T>>--allow-allfor full functionality)📋 Migration Guide
For Plugin Developers:
set-repl-varto use the new plugin-specific interfacesget-repl-varfunction for accessing REPL stateFor REPL Logic Components:
set-repl-varfunction🧪 Testing
📚 Documentation
🌐 Web Version Note
The web version of
plugin-teeis not part of this PR, it will be added in another one.This release represents a significant step forward in plugin capabilities while maintaining the REPL's core functionality and security model.