Plugin Lifecycle¶
The plugin lifecycle is straightforward but important: connect, announce, stay alive, handle responses, and return callbacks.
Video placeholder: plugin startup and request handling.
Startup¶
In the VS Code implementation:
- the extension activates
- the app instance starts
- IPC ensures a WebSocket connection
- the plugin sends
active
Steady State¶
While connected, the plugin:
- keeps reconnecting if disconnected
- sends
heartbeatevery minute - listens for
responsemessages
Handling A Response¶
When a response message arrives:
- the plugin parses it
- it dispatches each command to the local command handler
- it returns a callback payload if needed
- if no special result exists, it returns
completed
Why This Matters¶
This lifecycle is the contract that makes structured editing possible. Without it, the desktop app falls back to more generic system input paths.
Command Handler Surface¶
The VS Code command handler already supports operations such as:
- opening and closing tabs
- copy and paste
- revealing lines
- reading editor state
- applying source changes and cursor movement
That is the concrete bridge between Arqon Maestro’s interpreted commands and an editor’s actual buffer state.