Skip to content
Compare
Choose a tag to compare
@github-actions github-actions released this 16 Aug 17:41
· 50 commits to master since this release

🆕 New Features

plugin-tee

A new Rust-based plugin that implements the Unix tee command functionality:

  • File creation: Creates new files with content from the previous command output ($0)
  • File overwriting: Replaces existing file content
  • Append mode: Supports -a or --append flags to append content to existing files
  • Error handling: Provides detailed error messages for permission issues and file operations
  • Integration: Works seamlessly with other plugins like echo and cat in the REPL workflow

The plugin demonstrates the new plugin API capabilities by accessing REPL variables through the enhanced host interface.

⚠️ Breaking Changes

1. WIT Contract Changes (plugin-api.wit)

  • Added: host-state-plugin interface with get-repl-var function
  • Purpose: Allows plugins to access specific REPL variables by name (e.g., $0 for previous command output)
  • Impact: All existing plugins must be recompiled against the new WIT contracts

2. WIT Contract Changes (host-api.wit)

  • Removed: set-repl-var function from host-state interface
  • Reason: Functionality moved to plugin-specific interface for better separation of concerns
  • Impact: REPL logic components must be updated to use the new interface structure

🔧 Technical Implementation

  • Plugin Host: Enhanced with thread-safe REPL variable sharing using Arc<Mutex<T>>
  • WASM Integration: New bindings generated for all plugins to support the updated WIT contracts
  • Testing: Comprehensive test coverage for plugin-tee including file creation, overwriting, and append scenarios
  • Permissions: Plugin requires appropriate filesystem permissions (--allow-all for full functionality)

🧪 Testing

  • ✅ plugin-tee functionality (new file, overwrite, append)
  • ✅ Integration with existing plugins (echo, cat)
  • ✅ Error handling and permission management
  • ✅ WIT contract compatibility across all components

📚 Documentation

  • Added comprehensive README for plugin-tee
  • Updated WIT interface documentation
  • Enhanced test coverage demonstrating plugin capabilities

🌐 Web Version Note

The web version of plugin-tee is not part of this PR, it will be added in another one, see issue #12

This release represents a significant step forward in plugin capabilities while maintaining the REPL's core functionality and security model.

Installation

cargo install [email protected]

Full changelog: 0.4.2...0.5.0

PRs:

  • #11 Add plugin-tee and introduce breaking WIT changes for enhanced plugin capabilities