diff options
| author | Aram Drevekenin <aram@poor.dev> | 2024-01-17 12:10:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-17 12:10:49 +0100 |
| commit | d780bd91052d8282ba5a7f06c6fb7faa7ca7cc18 (patch) | |
| tree | ca08219a38b9e6a3b1c027682359074c86e0dbb5 /zellij-utils/src/plugin_api/plugin_command.proto | |
| parent | Bump rust version to 1.75.0 (#3039) (diff) | |
| download | sl0ppij-d780bd91052d8282ba5a7f06c6fb7faa7ca7cc18.tar.gz sl0ppij-d780bd91052d8282ba5a7f06c6fb7faa7ca7cc18.tar.xz sl0ppij-d780bd91052d8282ba5a7f06c6fb7faa7ca7cc18.zip | |
feat(plugins): introduce 'pipes', allowing users to pipe data to and control plugins from the command line (#3066)
* prototype - working with message from the cli
* prototype - pipe from the CLI to plugins
* prototype - pipe from the CLI to plugins and back again
* prototype - working with better cli interface
* prototype - working after removing unused stuff
* prototype - working with launching plugin if it is not launched, also fixed event ordering
* refactor: change message to cli-message
* prototype - allow plugins to send messages to each other
* fix: allow cli messages to send plugin parameters (and implement backpressure)
* fix: use input_pipe_id to identify cli pipes instead of their message name
* fix: come cleanups and add skip_cache parameter
* fix: pipe/client-server communication robustness
* fix: leaking messages between plugins while loading
* feat: allow plugins to specify how a new plugin instance is launched when sending messages
* fix: add permissions
* refactor: adjust cli api
* fix: improve cli plugin loading error messages
* docs: cli pipe
* fix: take plugin configuration into account when messaging between plugins
* refactor: pipe message protobuf interface
* refactor: update(event) -> pipe
* refactor - rename CliMessage to CliPipe
* fix: add is_private to pipes and change some naming
* refactor - cli client
* refactor: various cleanups
* style(fmt): rustfmt
* fix(pipes): backpressure across multiple plugins
* style: some cleanups
* style(fmt): rustfmt
* style: fix merge conflict mistake
* style(wording): clarify pipe permission
Diffstat (limited to 'zellij-utils/src/plugin_api/plugin_command.proto')
| -rw-r--r-- | zellij-utils/src/plugin_api/plugin_command.proto | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/zellij-utils/src/plugin_api/plugin_command.proto b/zellij-utils/src/plugin_api/plugin_command.proto index 53994a88..6ffb0345 100644 --- a/zellij-utils/src/plugin_api/plugin_command.proto +++ b/zellij-utils/src/plugin_api/plugin_command.proto @@ -87,6 +87,10 @@ enum CommandName { DeleteDeadSession = 73; DeleteAllDeadSessions = 74; RenameSession = 75; + UnblockCliPipeInput = 76; + BlockCliPipeInput = 77; + CliPipeOutput = 78; + MessageToPlugin = 79; } message PluginCommand { @@ -137,9 +141,45 @@ message PluginCommand { WebRequestPayload web_request_payload = 44; string delete_dead_session_payload = 45; string rename_session_payload = 46; + string unblock_cli_pipe_input_payload = 47; + string block_cli_pipe_input_payload = 48; + CliPipeOutputPayload cli_pipe_output_payload = 49; + MessageToPluginPayload message_to_plugin_payload = 50; } } +message CliPipeOutputPayload { + string pipe_name = 1; + string output = 2; +} + +message MessageToPluginPayload { + optional string plugin_url = 1; + repeated ContextItem plugin_config = 2; + string message_name = 3; + optional string message_payload = 4; + repeated ContextItem message_args = 5; + optional NewPluginArgs new_plugin_args = 6; +} + +message NewPluginArgs { + optional bool should_float = 1; + optional PaneId pane_id_to_replace = 2; + optional string pane_title = 3; + optional string cwd = 4; + bool skip_cache = 5; +} + +message PaneId { + PaneType pane_type = 1; + uint32 id = 2; +} + +enum PaneType { + Terminal = 0; + Plugin = 1; +} + message SwitchSessionPayload { optional string name = 1; optional uint32 tab_position = 2; |
