metal-kompanion/integrations/konsole/README.md

52 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Kompanion ⇄ Konsole Bridge
This directory contains the first draft of **KompanionKonsole**, a plugin for KDE's
Konsole terminal emulator. The plugin gives Kompanion agents a controlled way to
step into a Konsole tab, using the same Kompanion core that powers the MCP back end.
## Layout
```
KompanionKonsolePlugin/ # Drop-in plugin sources (mirrors Konsole/src/plugins layout)
```
The code is intentionally structured so it can live directly inside the Konsole
source tree (e.g. under `konsole/src/plugins`). You can keep developing it here
and then symlink/copy it into a Konsole checkout when you are ready to compile.
## Quick start (demo)
1. Ensure you have a Konsole checkout (see `/mnt/bulk/shared/kdesrc/konsole`).
2. From the Konsole repo, link the plugin:
```bash
ln -s /home/kompanion/dev/metal/src/metal-kompanion/integrations/konsole/KompanionKonsolePlugin \
src/plugins/KompanionKonsole
echo "add_subdirectory(KompanionKonsole)" >> src/plugins/CMakeLists.txt
```
3. Reconfigure Konsole with CMake; build the `konsole_kompanionplugin` target.
```bash
cmake -S . -B build
cmake --build build --target konsole_kompanionplugin
```
4. Launch the newly built Konsole. Open *Plugins → Kompanion Konsole Bridge* to
toggle the dock and use the **Launch Demo Agent Shell** or **Attach Active Tab**
buttons to hand the tab over to Kompanion.
The demo simply injects `kom_mcp --list` into the tab and prints a coloured banner.
Later iterations will replace this with the minimal TTY protocol described in the
roadmap.
## Notes
- The plugin depends on the in-tree `konsoleprivate` and `konsoleapp` targets, so it
currently builds only alongside the Konsole sources.
- Strings are translated via `KLocalizedString`, and actions are registered with the
Konsole action collection so shortcuts can be customised.
- All agentfacing commands are placeholder stubs; they go through Kompanion's CLI
entry points so real migrations can swap in more capable bridges without touching
the KDE plugin scaffolding.