TypeScript type definitions for the GUI Chat Protocol plus lightweight Vue and React adapters. These primitives let you build plugins that expose GUI-capable tool calls to any chat application.
An app built on this protocol is called a Mulmo App, and this package is the protocol layer of MulmoKit, the toolkit for building them. See MulmoKit, Mulmo Apps and Hosts.
Need the narrative overview, motivation, and roadmap? Read the GUI_CHAT_PROTOCOL.md spec.
README.md(this file): package usage, exports, and integration guidancespec/API_REFERENCE.md: canonical type signatures for core, Vue, and React APIsspec/PLUGIN_RUNTIME.md: the factory shape (definePlugin) and the runtime a host hands a Mulmo App — what MulmoClaude and MulmoTerminal loadspec/CREATING_A_PLUGIN.md: step-by-step guide for the{ plugin }object shape, for a host that bundles its pluginsspec/AI_NATIVE_BUSINESS_APP_ARCHITECTURE.md: how business apps are built from Mulmo Appsspec/GUI_CHAT_PROTOCOL.md: high-level protocol design, motivation, and long-form examplesAGENTS.md: contributor workflow, scripts, and review requirements
| Path | Purpose |
|---|---|
src/types.ts, src/schema.ts, src/inputHandlers.ts |
Core framework-agnostic contracts |
src/vue.ts, src/react.ts |
Adapter typings for Vue 3 and React 18/19 |
spec/ |
Protocol specification (GUI_CHAT_PROTOCOL.md), API reference, and plugin guides |
dist/ |
Build artifacts generated by yarn build |
tsconfig.json, vite.config.ts |
Build + declaration settings |
Pair this README with the spec docs referenced above: use spec/GUI_CHAT_PROTOCOL.md for motivation, spec/API_REFERENCE.md for exact signatures, and spec/CREATING_A_PLUGIN.md for the scaffold walkthrough.
This npm package (gui-chat-protocol) provides the TypeScript type definitions for implementing the GUI Chat Protocol:
- Framework-agnostic core types - For plugin logic without UI dependencies
- Vue adapter - Vue 3 component types
- React adapter - React 18/19 component types
By defining a standard protocol, plugins become portable across different chat applications, and applications can easily integrate plugins without framework-specific dependencies.
┌─────────────────────────────────────────────────────────────┐
│ Chat Application │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
│ │ LLM │ │ Plugin │ │ UI Layer │ │
│ │ Interface │◄─┤ Manager │◄─┤ (Vue/React/etc.) │ │
│ └─────────────┘ └──────┬──────┘ └─────────────────────┘ │
└──────────────────────────┼──────────────────────────────────┘
│
┌─────────────────┼─────────────────┐
│ │ │
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐
│ Plugin A │ │ Plugin B │ │ Plugin C │
│ (Quiz) │ │ (Image) │ │ (Form) │
└───────────┘ └───────────┘ └───────────┘
| Type | Description |
|---|---|
ToolPluginCore |
Framework-agnostic plugin definition |
ToolPlugin |
Vue-specific plugin with Vue components |
ToolPluginReact |
React-specific plugin with React components |
ToolResult |
Standardized result from plugin execution |
ToolContext |
Context passed to plugin execute function |
ToolDefinition |
OpenAI-compatible function definition |
npm install gui-chat-protocol
# or
yarn add gui-chat-protocol// Core types (framework-agnostic)
import { ToolPluginCore, ToolResult, ToolContext } from "gui-chat-protocol";
// Vue-specific types
import { ToolPlugin } from "gui-chat-protocol/vue";
// React-specific types
import { ToolPluginReact } from "gui-chat-protocol/react";Detailed type signatures now live in spec/API_REFERENCE.md. Keep this README focused on architecture, tooling, and integration guidance.
Start from the MulmoKit scaffold, not from an empty folder:
npx create-mulmoclaude-plugin my-app # or @your-scope/my-app
cd my-app
yarn install
yarn buildIt creates a working counter app in the factory shape — definePlugin on the server (src/index.ts), the tool definition shared by both sides (src/definition.ts) and a View.vue card that uses useRuntime() — with the build and lint config already set up. Replace the counter with what your app does. The contract it is written against, and every runtime API it may use (files, fetch, pubsub, log, dispatch, subscribe), is in spec/PLUGIN_RUNTIME.md. The scaffold's own README explains the generated files and how to publish: create-mulmoclaude-plugin.
MulmoTerminal — the quickest loop. Ask the agent in any cell to build a Mulmo App with you (or press Make a plugin in Settings → Installed plugins). Its mulmoterminal-plugin-create skill asks what the app is for, scaffolds it, builds it, installs it into your workspace and calls it so the card opens on the Canvas — and repeats the build and install after every change. By hand, the same install is:
npm pack
npx mulmoterminal@latest plugin add ./my-app-0.1.0.tgz --yes --cwd <your workspace>The running server picks it up without a restart. How an installed app is loaded, called and drawn, and what to check when it does not appear, is in MulmoTerminal's Plugin development guide.
MulmoClaude — load the project folder directly while you work on it:
yarn dev # terminal A: rebuild dist/ on every save
mulmoclaude --dev-plugin /abs/path/to/my-app # terminal BEdits to the card reload in the browser; a change to src/index.ts needs a restart of mulmoclaude.
The examples below and MulmoChat use a different shape: a default export { plugin } whose plugin carries toolDefinition, execute(context, args) and viewComponent / previewComponent. It is for a host that imports the plugin into its own build, as in Building Your Own Application. MulmoClaude and MulmoTerminal do not load it from an installed package: an installed app must be in the factory shape, or export TOOL_DEFINITION and a handler named after the tool as top-level named exports (spec/PLUGIN_RUNTIME.md → Backward compatibility). The walkthrough for the object shape (types → core plugin → Vue/React wrappers) is in spec/CREATING_A_PLUGIN.md.
An interactive quiz plugin that presents multiple-choice questions:
- Repository: MulmoChatPluginQuiz
- Features:
- Multiple questions with choices
- Answer tracking with viewState persistence
- Both Vue and React implementations
// Usage
import QuizPlugin from "@mulmochat-plugin/quiz/vue";
// or
import QuizPlugin from "@mulmochat-plugin/quiz/react";An image generation plugin that creates images from text prompts:
- Repository: MulmoChatPluginGenerateImage
- Features:
- Text-to-image generation
- File upload and clipboard paste support
- Backend abstraction for different providers
// Usage
import GenerateImagePlugin from "@mulmochat-plugin/generate-image/vue";| Term | What it is |
|---|---|
| Mulmo App | One app built on this protocol — a spreadsheet, a todo list, a chart, an accounting system. The LLM calls it as a tool, and it answers with a GUI in the chat |
| MulmoKit | The toolkit for building Mulmo Apps: gui-chat-protocol (this package, the protocol), create-mulmoclaude-plugin (the scaffold) and @mulmoclaude/core (shared building blocks) |
| Host | An application that loads Mulmo Apps, hands their tool definitions to the LLM, and renders their results |
Mulmo Apps used to be called plugins, and the code still uses that name: the types (ToolPlugin, ToolPluginCore), the spec documents and the package names (@mulmoclaude/<name>-plugin, @mulmochat-plugin/*) are unchanged. In this repository, "plugin" and "Mulmo App" mean the same thing.
Because the protocol is the contract between the two sides, a Mulmo App written once runs in any host below.
An AI assistant that you nurture on your own computer, built on the Claude Code Agent SDK. It is local-first: memories, data and apps stay as plain files in your workspace. Chat summons the right Mulmo App for each task — wiki, spreadsheet, chart, form, 3D — and Claude composes across them.
- Repository: receptron/mulmoclaude
- Install:
npx mulmoclaude@latest - Mulmo Apps: ships many built in (wiki, accounting, chart, form, markdown, HTML, collection …) and loads more from npm at runtime
A browser terminal grid that runs several Claude Code and Codex sessions side by side and shows which agent needs you. It is local and tmux-backed. The agent in each cell can call Mulmo Apps, so its answers can be a chart, a form or an HTML page rather than only text.
- Repository: receptron/mulmoterminal
- Install:
npx mulmoterminal@latest - Mulmo Apps: ships the
@mulmoclaude/*set (markdown, form, chart, HTML, collection, accounting, mulmoscript, google …).npx mulmoterminal@latest plugin add <npm name | github:owner/repo | ./file.tgz>installs more - Shared with MulmoClaude: both hosts read the same workspace ledger (
plugins/plugins.json), so a Mulmo App installed from one is available in the other
A research prototype for chat that is not a text stream: a multi-modal voice chat application in which each kind of answer is a plugin on this protocol.
- Repository: MulmoChat
- Features:
- OpenAI Realtime API integration
- Voice and text input
- Multiple backend providers
- Full plugin ecosystem
Any application can implement the GUI Chat Protocol by:
- Loading plugins that export
{ plugin }default export - Passing tool definitions to the LLM
- Executing plugins via
plugin.execute(context, args) - Rendering plugin components (
viewComponent/previewComponent) - Handling
ToolResultfor UI updates and LLM responses
// Example: Loading a plugin
import Plugin from "@mulmochat-plugin/quiz/vue";
// Get tool definition for LLM
const tools = [Plugin.plugin.toolDefinition];
// Execute when LLM calls the tool
const result = await Plugin.plugin.execute(context, args);
// Render the view component
<component :is="Plugin.plugin.viewComponent" :selected-result="result" />| Framework | Import Path | Plugin Type |
|---|---|---|
| Core (no UI) | gui-chat-protocol |
ToolPluginCore |
| Vue 3 | gui-chat-protocol/vue |
ToolPlugin |
| React 18/19 | gui-chat-protocol/react |
ToolPluginReact |
Both Vue and React are optional peer dependencies - only install what you need.
MIT