How to use an extension
An extension adds something Koma can do: a tool, a tab, a terminal screen, or a sign-in. You use one from inside Koma. You do not paste it into the chat.
This protocol is still version 0. It will change.
Use one that is already on this computer
Open Koma. Type this and press Enter.
/extensionType /extension. This is every add-on on this computer. A row here is not yet available in the conversation you are in.
A sample of the terminal. Nothing here is your conversation.
That list is installed software. It is not on for this conversation yet.
Type this and press Enter.
/extension useType /extension use. Enter on a row turns that add-on on for this conversation only. Esc returns you to the chat.
A sample of the terminal. Nothing here is your conversation.
Highlight the row and press Enter. That add-on can now be called in this conversation. Other conversations stay as they were. Press Esc to go back to the chat.
Then ask in a normal sentence. For the echo sample, the tool is named echo and it takes the text you want repeated.
Use the echo tool. The text is hello.Koma calls the extension, the extension answers, and you see the reply in the chat.
Use one from the store
Type this when you want an add-on Koma publishes, instead of one you built.
/storeType /store when you want one Koma already publishes. Enter opens it. Install asks you to confirm before anything is downloaded.
A sample of the terminal. Nothing here is your conversation.
Enter opens the row. Install asks before it downloads. After it is installed, go back and run /extension use so this conversation can call it.
Try the echo sample yourself
This is the shortest extension. It adds one tool and does not call back into Koma. From the src-extension directory:
cargo run -p echo-tool-daemonNo Koma window is required for that command. The program prints the handshake and a pretend tool call whose text is hello. Read that printout. It is the same call Koma will make after you install the extension.
When the printout looks right, pack it and install it on this machine.
./pack.sh
koma ext install --dev dist/echo-tool-daemon.zipOpen Koma, run /extension, then /extension use, and choose Echo Tool. Ask it to echo hello, as above.
The manifest, grants, and the other samples are the reference for when you write your own. You do not need them to use one. Smallest program is the next page if you want to change the echo tool.