Chat copilot plugin for Paperclip — interactive AI assistant for managing tasks, agents, and workspaces
TypeScript
59
12 commits
updated Mar 10, 2026
Multi-adapter AI chat plugin for Paperclip. Provides a conversational interface to Paperclip agents with thread management, slash commands, and real-time streaming.
The plugin creates a chat UI inside the Paperclip plugin page slot. When a user sends a message, the plugin:
ctx.agents.list() (prefers "Chat Assistant", falls back to role "general")ctx.agents.sessionsAll LLM access goes through Paperclip's agent session system. The plugin does not talk to models directly — it talks to agents that talk to models. See Plugin vs Core Analysis for the implications of this architecture.
adapterType: "claude_local" (or another supported adapter)npm run build
Produces dist/worker.js (server-side) and dist/ui/index.js (browser bundle).
docker cp dist/ui/index.js paperclip-plugin-chat-server-1:/app/packages/plugins/plugin-chat/dist/ui/index.js
Hard refresh the browser after deploying — the server caches bundles with ETags.
Type / in the input to access built-in commands:
| Command | Action |
|---|---|
/tasks | List active tasks |
/dashboard | Workspace dashboard |
/agents | Agent status overview |
/create | Create a new task |
/projects | List projects |
/costs | Cost breakdown |
/activity | Recent activity |
/blocked | Blocked tasks |
/plan | Plan and break down work |
/handoff | Hand off work to an agent |
The plugin supports real-time streaming via SSE (ctx.streams). During agent execution, users see live text output with a blinking cursor, tool activity indicators, and a stop button.
Navigate to Settings > Plugins > Chat (gear icon):
| Setting | Description |
|---|---|
| Default Adapter | Adapter type for new threads (claude_local, codex_local, opencode_local) |
| System Prompt Override | Custom text appended to chat sessions |
| Capability | Purpose |
|---|---|
ui.page.register | Full chat page at /:prefix/plugins/:pluginId |
ui.sidebar.register | Sidebar entry point |
agent.sessions.* | Create and message agent sessions |
agents.read | Discover available agents/adapters |
plugin.state.* | Thread and message persistence |
activity.log.write | Activity logging |
Browser Server
------- ------
ChatPage (React)
|
|-- usePluginData("threads") --> Worker: getData("threads")
|-- usePluginData("messages") --> Worker: getData("messages")
|-- usePluginAction("sendMessage") --> Worker: sendMessage action
| |
| |--> ctx.agents.sessions.create()
| |--> ctx.agents.sessions.sendMessage()
| | |
| | +--> Agent adapter --> CLI process
| | |
| | +--> onEvent callbacks
| |
| |--> ctx.streams.emit() (SSE)
|
|-- usePluginStream("chat:threadId") <-- SSE events (text, thinking, tool, done)
For the full analysis, see Plugin vs Core: Chat Feature Analysis.
See the Testing Guide for setup instructions, a full test checklist, and troubleshooting steps.
| Document | Description |
|---|---|
| Plugin vs Core Analysis | Why chat as a plugin has fundamental limitations |
| Testing Guide | Test checklist and setup for testers |
| Core Integration Spec | Recommendation for building chat as a core page |
| Streaming Implementation | SSE streaming architecture notes |
| Stream Bus Gap | Stream bus wiring analysis |
12 commits
TypeScript
99.2%
Chat copilot plugin for Paperclip — interactive AI assistant for managing tasks, agents, and workspaces
TypeScript
59
12 commits
updated Mar 10, 2026
Multi-adapter AI chat plugin for Paperclip. Provides a conversational interface to Paperclip agents with thread management, slash commands, and real-time streaming.
The plugin creates a chat UI inside the Paperclip plugin page slot. When a user sends a message, the plugin:
ctx.agents.list() (prefers "Chat Assistant", falls back to role "general")ctx.agents.sessionsAll LLM access goes through Paperclip's agent session system. The plugin does not talk to models directly — it talks to agents that talk to models. See Plugin vs Core Analysis for the implications of this architecture.
adapterType: "claude_local" (or another supported adapter)npm run build
Produces dist/worker.js (server-side) and dist/ui/index.js (browser bundle).
docker cp dist/ui/index.js paperclip-plugin-chat-server-1:/app/packages/plugins/plugin-chat/dist/ui/index.js
Hard refresh the browser after deploying — the server caches bundles with ETags.
Type / in the input to access built-in commands:
| Command | Action |
|---|---|
/tasks | List active tasks |
/dashboard | Workspace dashboard |
/agents | Agent status overview |
/create | Create a new task |
/projects | List projects |
/costs | Cost breakdown |
/activity | Recent activity |
/blocked | Blocked tasks |
/plan | Plan and break down work |
/handoff | Hand off work to an agent |
The plugin supports real-time streaming via SSE (ctx.streams). During agent execution, users see live text output with a blinking cursor, tool activity indicators, and a stop button.
Navigate to Settings > Plugins > Chat (gear icon):
| Setting | Description |
|---|---|
| Default Adapter | Adapter type for new threads (claude_local, codex_local, opencode_local) |
| System Prompt Override | Custom text appended to chat sessions |
| Capability | Purpose |
|---|---|
ui.page.register | Full chat page at /:prefix/plugins/:pluginId |
ui.sidebar.register | Sidebar entry point |
agent.sessions.* | Create and message agent sessions |
agents.read | Discover available agents/adapters |
plugin.state.* | Thread and message persistence |
activity.log.write | Activity logging |
Browser Server
------- ------
ChatPage (React)
|
|-- usePluginData("threads") --> Worker: getData("threads")
|-- usePluginData("messages") --> Worker: getData("messages")
|-- usePluginAction("sendMessage") --> Worker: sendMessage action
| |
| |--> ctx.agents.sessions.create()
| |--> ctx.agents.sessions.sendMessage()
| | |
| | +--> Agent adapter --> CLI process
| | |
| | +--> onEvent callbacks
| |
| |--> ctx.streams.emit() (SSE)
|
|-- usePluginStream("chat:threadId") <-- SSE events (text, thinking, tool, done)
For the full analysis, see Plugin vs Core: Chat Feature Analysis.
See the Testing Guide for setup instructions, a full test checklist, and troubleshooting steps.
| Document | Description |
|---|---|
| Plugin vs Core Analysis | Why chat as a plugin has fundamental limitations |
| Testing Guide | Test checklist and setup for testers |
| Core Integration Spec | Recommendation for building chat as a core page |
| Streaming Implementation | SSE streaming architecture notes |
| Stream Bus Gap | Stream bus wiring analysis |
12 commits
TypeScript
99.2%