pikiloop 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +353 -0
  3. package/README.v2.md +287 -0
  4. package/README.zh-CN.md +352 -0
  5. package/dashboard/dist/assets/AgentTab-UZPIhlkr.js +1 -0
  6. package/dashboard/dist/assets/DirBrowser-Ckcmi-Pi.js +1 -0
  7. package/dashboard/dist/assets/ExtensionsTab-KZhEDrdu.js +1 -0
  8. package/dashboard/dist/assets/IMAccessTab-Bd_IY1GQ.js +1 -0
  9. package/dashboard/dist/assets/Modal-CTeL0y7P.js +1 -0
  10. package/dashboard/dist/assets/Modals-axftHasy.js +1 -0
  11. package/dashboard/dist/assets/Select-C8tOdPhe.js +1 -0
  12. package/dashboard/dist/assets/SessionPanel-C1geSRxw.js +1 -0
  13. package/dashboard/dist/assets/SystemTab-DBDkaPiO.js +1 -0
  14. package/dashboard/dist/assets/anthropic-BAdojD7P.ico +0 -0
  15. package/dashboard/dist/assets/codex-DYadqqp0.png +0 -0
  16. package/dashboard/dist/assets/deepseek-BeYNZEk0.ico +0 -0
  17. package/dashboard/dist/assets/doubao-DloFDuFR.png +0 -0
  18. package/dashboard/dist/assets/feishu-C4OMrjCW.ico +0 -0
  19. package/dashboard/dist/assets/gemini-BYkEpiWr.svg +1 -0
  20. package/dashboard/dist/assets/hermes-BAarh-tH.png +0 -0
  21. package/dashboard/dist/assets/index-CpM4CqZJ.js +23 -0
  22. package/dashboard/dist/assets/index-DXSohzrE.js +3 -0
  23. package/dashboard/dist/assets/index-reSbuley.css +1 -0
  24. package/dashboard/dist/assets/markdown-DxQYQFeH.js +29 -0
  25. package/dashboard/dist/assets/minimax-PuEGTfrF.ico +0 -0
  26. package/dashboard/dist/assets/mlx-DhWwjtMw.png +0 -0
  27. package/dashboard/dist/assets/ollama-Bt9O-2K_.png +0 -0
  28. package/dashboard/dist/assets/openrouter-CsJ_bD5Q.ico +0 -0
  29. package/dashboard/dist/assets/playwright-BldPFZgC.ico +0 -0
  30. package/dashboard/dist/assets/qwen-xykkX0_y.png +0 -0
  31. package/dashboard/dist/assets/react-vendor-C7Sl8SE7.js +9 -0
  32. package/dashboard/dist/assets/router-DHISdpPk.js +3 -0
  33. package/dashboard/dist/assets/shared-BIP_4k4I.js +1 -0
  34. package/dashboard/dist/favicon.svg +28 -0
  35. package/dashboard/dist/index.html +17 -0
  36. package/dist/agent/acp-client.js +261 -0
  37. package/dist/agent/auto-update.js +432 -0
  38. package/dist/agent/await-resume.js +50 -0
  39. package/dist/agent/cli/auth.js +325 -0
  40. package/dist/agent/cli/catalog.js +40 -0
  41. package/dist/agent/cli/detector.js +136 -0
  42. package/dist/agent/cli/index.js +7 -0
  43. package/dist/agent/cli/registry.js +33 -0
  44. package/dist/agent/driver.js +39 -0
  45. package/dist/agent/drivers/claude-tui.js +2297 -0
  46. package/dist/agent/drivers/claude.js +2689 -0
  47. package/dist/agent/drivers/codex.js +2210 -0
  48. package/dist/agent/drivers/gemini.js +1059 -0
  49. package/dist/agent/drivers/hermes.js +795 -0
  50. package/dist/agent/goal.js +274 -0
  51. package/dist/agent/handover.js +130 -0
  52. package/dist/agent/images.js +355 -0
  53. package/dist/agent/index.js +50 -0
  54. package/dist/agent/mcp/bridge.js +791 -0
  55. package/dist/agent/mcp/extensions.js +637 -0
  56. package/dist/agent/mcp/oauth.js +353 -0
  57. package/dist/agent/mcp/registry.js +119 -0
  58. package/dist/agent/mcp/session-server.js +229 -0
  59. package/dist/agent/mcp/tools/ask-user.js +113 -0
  60. package/dist/agent/mcp/tools/await-resume.js +77 -0
  61. package/dist/agent/mcp/tools/goal.js +144 -0
  62. package/dist/agent/mcp/tools/types.js +12 -0
  63. package/dist/agent/mcp/tools/workspace.js +212 -0
  64. package/dist/agent/npm.js +31 -0
  65. package/dist/agent/session.js +1206 -0
  66. package/dist/agent/skill-installer.js +160 -0
  67. package/dist/agent/skills.js +257 -0
  68. package/dist/agent/stream.js +743 -0
  69. package/dist/agent/types.js +13 -0
  70. package/dist/agent/utils.js +687 -0
  71. package/dist/bot/bot.js +2499 -0
  72. package/dist/bot/command-ui.js +633 -0
  73. package/dist/bot/commands.js +513 -0
  74. package/dist/bot/headless-bot.js +36 -0
  75. package/dist/bot/host.js +192 -0
  76. package/dist/bot/human-loop.js +168 -0
  77. package/dist/bot/menu.js +48 -0
  78. package/dist/bot/orchestration.js +79 -0
  79. package/dist/bot/render-shared.js +309 -0
  80. package/dist/bot/session-hub.js +361 -0
  81. package/dist/bot/session-status.js +55 -0
  82. package/dist/bot/streaming.js +309 -0
  83. package/dist/browser-profile.js +579 -0
  84. package/dist/browser-supervisor.js +249 -0
  85. package/dist/catalog/cli-tools.js +421 -0
  86. package/dist/catalog/index.js +21 -0
  87. package/dist/catalog/local-models.js +94 -0
  88. package/dist/catalog/mcp-servers.js +315 -0
  89. package/dist/catalog/skill-repos.js +173 -0
  90. package/dist/channels/base.js +55 -0
  91. package/dist/channels/dingtalk/bot.js +549 -0
  92. package/dist/channels/dingtalk/channel.js +268 -0
  93. package/dist/channels/discord/bot.js +552 -0
  94. package/dist/channels/discord/channel.js +245 -0
  95. package/dist/channels/feishu/bot.js +1275 -0
  96. package/dist/channels/feishu/channel.js +911 -0
  97. package/dist/channels/feishu/markdown.js +91 -0
  98. package/dist/channels/feishu/render.js +619 -0
  99. package/dist/channels/health.js +109 -0
  100. package/dist/channels/slack/bot.js +554 -0
  101. package/dist/channels/slack/channel.js +283 -0
  102. package/dist/channels/states.js +6 -0
  103. package/dist/channels/telegram/bot.js +1310 -0
  104. package/dist/channels/telegram/channel.js +820 -0
  105. package/dist/channels/telegram/directory.js +111 -0
  106. package/dist/channels/telegram/live-preview.js +220 -0
  107. package/dist/channels/telegram/render.js +384 -0
  108. package/dist/channels/wecom/bot.js +558 -0
  109. package/dist/channels/wecom/channel.js +479 -0
  110. package/dist/channels/weixin/api.js +520 -0
  111. package/dist/channels/weixin/bot.js +1000 -0
  112. package/dist/channels/weixin/channel.js +222 -0
  113. package/dist/cli/autostart.js +262 -0
  114. package/dist/cli/channel-supervisor.js +313 -0
  115. package/dist/cli/channels.js +54 -0
  116. package/dist/cli/main.js +726 -0
  117. package/dist/cli/onboarding.js +227 -0
  118. package/dist/cli/run.js +308 -0
  119. package/dist/cli/setup-wizard.js +235 -0
  120. package/dist/core/config/runtime-config.js +201 -0
  121. package/dist/core/config/user-config.js +510 -0
  122. package/dist/core/config/validation.js +521 -0
  123. package/dist/core/constants.js +400 -0
  124. package/dist/core/git.js +145 -0
  125. package/dist/core/legacy-compat.js +60 -0
  126. package/dist/core/logging.js +101 -0
  127. package/dist/core/platform.js +59 -0
  128. package/dist/core/process-control.js +315 -0
  129. package/dist/core/secrets/index.js +42 -0
  130. package/dist/core/secrets/inline-seal.js +60 -0
  131. package/dist/core/secrets/ref.js +33 -0
  132. package/dist/core/secrets/resolver.js +65 -0
  133. package/dist/core/secrets/store.js +63 -0
  134. package/dist/core/utils.js +233 -0
  135. package/dist/core/version.js +15 -0
  136. package/dist/dashboard/platform.js +219 -0
  137. package/dist/dashboard/routes/agents.js +450 -0
  138. package/dist/dashboard/routes/cli.js +174 -0
  139. package/dist/dashboard/routes/config.js +523 -0
  140. package/dist/dashboard/routes/extensions.js +745 -0
  141. package/dist/dashboard/routes/local-models.js +290 -0
  142. package/dist/dashboard/routes/models.js +324 -0
  143. package/dist/dashboard/routes/sessions.js +838 -0
  144. package/dist/dashboard/runtime.js +410 -0
  145. package/dist/dashboard/server.js +237 -0
  146. package/dist/dashboard/session-control.js +347 -0
  147. package/dist/model/catalog.js +104 -0
  148. package/dist/model/index.js +20 -0
  149. package/dist/model/injector.js +272 -0
  150. package/dist/model/provider-models.js +112 -0
  151. package/dist/model/store.js +212 -0
  152. package/dist/model/types.js +13 -0
  153. package/dist/model/validation.js +203 -0
  154. package/package.json +82 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 pikiloop contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,353 @@
1
+ <div align="center">
2
+
3
+ <img src="docs/logo-wordmark.png" alt="pikiloop" width="440">
4
+
5
+ ## Put the world's smartest AI agents in your pocket.
6
+
7
+ ##### *The open Agent orchestrator for the era when creators no longer need to read code.*
8
+
9
+ *Plug in any agent (Claude · Codex · Gemini · Hermes · …), any model (Claude · GPT · Gemini · DeepSeek · Doubao · MiMo · MiniMax · OpenRouter · or any third-party proxy), and any tool (Skills · MCP · CLI). Drive them seamlessly from your favorite terminal—whether it's an IM, Web Dashboard, or future interfaces. pikiloop is built using pikiloop.*
10
+
11
+ ```bash
12
+ npx pikiloop@latest
13
+ ```
14
+
15
+ <p>
16
+ <a href="https://www.npmjs.com/package/pikiloop"><img src="https://img.shields.io/npm/v/pikiloop?label=npm&color=cb3837" alt="npm"></a>
17
+ <a href="https://www.npmjs.com/package/pikiloop"><img src="https://img.shields.io/npm/dm/pikiloop?label=downloads&color=success" alt="npm downloads"></a>
18
+ <a href="https://github.com/xiaotonng/pikiloop/stargazers"><img src="https://img.shields.io/github/stars/xiaotonng/pikiloop?style=flat&color=yellow" alt="GitHub stars"></a>
19
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License: MIT"></a>
20
+ <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%E2%89%A520-green.svg" alt="Node 20+"></a>
21
+ </p>
22
+
23
+ <p>
24
+ <b>English</b> | <a href="README.zh-CN.md">简体中文</a>
25
+ </p>
26
+
27
+ <img src="docs/promo-orchestrator.png" alt="Pikiloop — AI-Native Agent Orchestrator" width="820">
28
+
29
+ </div>
30
+
31
+ ---
32
+
33
+ ## What is pikiloop?
34
+
35
+ **Most "AI dev tools" settle for a narrow slice of the pie—binding you to a single IDE, a specific agent, or a closed model ecosystem.** pikiloop is built on a fundamentally different premise: the next era of software creation won't be confined to a single code editor. It happens within an **Orchestrator** that empowers a creator to drive a *swarm* of agents—in parallel, from one console—running on the best models available, through whichever terminal is closest at hand. And you might never need to open a code file.
36
+
37
+ The product is the orchestrator itself. Everything else simply plugs in. **And what's cooler is that this orchestrator is entirely self-bootstrapped**—pikiloop is what we use to build pikiloop.
38
+
39
+ The diagram above maps the four layers we stitch together:
40
+
41
+ - **Entry Points** — Telegram, Feishu, WeChat, Slack, Discord, DingTalk, WeCom, the Web Dashboard, and the local API/CLI are all first-class, co-equal terminals. New ones plug right in.
42
+ - **Pluggable Agents** — Claude Code, Codex, Gemini, and Hermes ship as built-in drivers. Hermes speaks ACP (Agent Client Protocol); the registry accepts any CLI- or ACP-based agent through the same `AgentDriver` contract.
43
+ - **Model Routing** — Frontier (Claude · GPT · Gemini), Chinese domestic (DeepSeek · Doubao · MiMo · MiniMax · Qwen), local runtimes (Ollama, mlx-lm on Apple Silicon), OpenRouter, and any OpenAI-compatible proxy. Providers + Profiles are a first-class vault with a read-only `models.dev` catalog and per-agent environment injection at spawn time.
44
+ - **Tool Mesh** — Skills, MCP servers, CLI tools, web search, and desktop automation, intelligently merged across global × workspace scopes and silently injected into every session.
45
+
46
+ Sitting in the middle is the **Pikiloop Orchestration Core** — the runtime that owns routing, memory, observability, and the bot lifecycle so any terminal can talk to any agent on any model through any tool.
47
+
48
+ ---
49
+
50
+ ## Built with Itself
51
+
52
+ > The most credible test of an Agent orchestrator is whether it can build itself. pikiloop can. We use pikiloop to develop, test, release, and operate pikiloop—driving every commit and every release.
53
+
54
+ A typical day of development inside pikiloop:
55
+
56
+ - A Claude Code session in pane 1 implements a new dashboard route.
57
+ - A Codex session in pane 2 writes the matching unit tests against the same workspace.
58
+ - A Gemini session in pane 3 reviews the diffs and drafts the changelog.
59
+ - Meanwhile, a background skill (`/sk_promote`) sweeps GitHub for relevant issues and automatically drafts replies in a fourth thread.
60
+ - All four streams run entirely in parallel; a single human steers them all from a phone in a coffee shop.
61
+
62
+ The orchestrator is the product. It also happens to be the ultimate IDE in which the orchestrator itself is built.
63
+
64
+ ---
65
+
66
+ ## A Swarm by Default
67
+
68
+ Most "AI dev tools" assume a 1:1:1 ratio: one user, one agent, one task at a time. pikiloop assumes the exact opposite: **N agents, N windows, one operator, one unified toolkit.**
69
+
70
+ - **N Parallel Sessions** — Every dashboard pane represents an independent agent stream tied to an independent session workspace. Add IM threads, and you scale effortlessly.
71
+ - **Mix-and-Match Agents** — Run Claude Code in pane 1, Codex in pane 2, and Gemini in pane 3, all working simultaneously on different repositories or workspaces.
72
+ - **One Unified Toolkit** — Global skills, global MCP servers, and per-workspace overrides apply uniformly. Configure it once, and every session inherits the power.
73
+ - **Steer from Anywhere** — Interrupt any running stream, queue a follow-up instruction, or hand over control to the next agent in line seamlessly.
74
+ - **Group Collaboration Mode** — Drop the orchestrator into a Feishu, Slack, Discord, or WeCom group, and let your entire team share and steer the same agent swarm.
75
+
76
+ This is the shape that matters: one creator, with a swarm of AI agents at their fingertips.
77
+
78
+ ---
79
+
80
+ ## See It in Action
81
+
82
+ > **Real-world Task** — Ask pikiloop to gather and summarize today's AI news; the agent reads, writes, and ships the results back through Telegram, all controlled from your phone.
83
+
84
+ <p align="center"><img src="docs/promo-demo.gif" alt="Demo: Ask Telegram, agent works locally, result returns to chat" width="780"></p>
85
+
86
+ > **Web Dashboard** — Multi-pane workspace with a session list, live conversation threads, tool-use traces, file/image attachments, queued-task chips, and a unified input composer (1 / 2 / 3 / 6 pane layouts, light/dark theme, EN/中文).
87
+
88
+ <p align="center"><img src="docs/promo-dashboard-workspace.png" alt="Web Dashboard workspace" width="780"></p>
89
+
90
+ <details>
91
+ <summary><b>More: Basic Ops · IM Access · Agents · Models · Extensions · Permissions · System Info</b></summary>
92
+
93
+ > Send a message, watch the agent stream its thoughts, and receive files back instantly.
94
+
95
+ <img src="docs/promo-basic-ops.gif" alt="Basic operations" width="780">
96
+
97
+ > **IM Access** — Check and configure connection statuses for Telegram, Feishu, WeChat, Slack, Discord, DingTalk, and WeCom.
98
+
99
+ <img src="docs/promo-dashboard-im.png" alt="IM Access" width="780">
100
+
101
+ > **Agents** — Manage installed agent CLIs, set your default agent, configure per-agent models and reasoning effort, and bind a Profile to drive an agent on a non-native model.
102
+
103
+ <img src="docs/promo-dashboard-agents.png" alt="Agents" width="780">
104
+
105
+ > **Models** — A secure Providers + Profiles vault (Claude · GPT · Gemini · DeepSeek · Doubao · MiMo · MiniMax · Qwen · OpenRouter · any OpenAI-compatible proxy), validated against the read-only `models.dev` catalog and injected per-agent at spawn time. Local backends (Ollama, mlx-lm on Apple Silicon) attach automatically the moment they're detected.
106
+
107
+ > **Extensions** — Manage global MCP servers, community skills, and built-in automation for headless browsers and macOS desktop (Peekaboo). Add servers via stdio, HTTP, or OAuth 2.1 with Dynamic Client Registration.
108
+
109
+ <img src="docs/promo-dashboard-extensions.png" alt="Extensions" width="780">
110
+
111
+ > **System Permissions** — Handle macOS Accessibility, Screen Recording, and Disk Access permissions seamlessly.
112
+
113
+ <img src="docs/promo-dashboard-permissions.png" alt="Permissions" width="780">
114
+
115
+ > **System Info** — Monitor your working directory alongside real-time CPU, memory, and disk usage.
116
+
117
+ <img src="docs/promo-dashboard-system.png" alt="System Info" width="780">
118
+
119
+ </details>
120
+
121
+ ---
122
+
123
+ ## Quick Start
124
+
125
+ **Prerequisites:** Node.js 20+, plus at least one official Agent CLI installed and authenticated on your system:
126
+
127
+ - [`claude`](https://docs.anthropic.com/en/docs/claude-code) (Claude Code)
128
+ - [`codex`](https://github.com/openai/codex) (Codex CLI)
129
+ - [`gemini`](https://github.com/google-gemini/gemini-cli) (Gemini CLI)
130
+ - `hermes` (Hermes — via ACP / Agent Client Protocol)
131
+
132
+ **Launch:**
133
+
134
+ ```bash
135
+ cd your-workspace
136
+ npx pikiloop@latest
137
+ ```
138
+
139
+ This instantly opens the **Web Dashboard** at `http://localhost:3939`. From there, you can drive sessions in the browser, connect IM channels, configure agents and models, install MCP servers and skills, and manage system permissions. Everything else is just one click away.
140
+
141
+ <details>
142
+ <summary><b>Prefer the terminal? We have a setup wizard.</b></summary>
143
+
144
+ ```bash
145
+ npx pikiloop@latest --setup # Interactive terminal setup wizard
146
+ npx pikiloop@latest --doctor # Environment health check only
147
+ ```
148
+
149
+ </details>
150
+
151
+ <details>
152
+ <summary><b>Want to run it on a server? Docker is supported.</b></summary>
153
+
154
+ ```bash
155
+ docker run -d --name pikiloop -p 3939:3939 \
156
+ -e TELEGRAM_BOT_TOKEN=... \
157
+ -e ANTHROPIC_API_KEY=sk-ant-... \
158
+ -v pikiloop-config:/home/piki/.pikiloop \
159
+ -v pikiloop-workspace:/workspace \
160
+ ghcr.io/xiaotonng/pikiloop:latest
161
+ ```
162
+
163
+ The official multi-arch image (`linux/amd64` + `linux/arm64`) bakes in
164
+ `claude-code`, `codex`, and `gemini-cli`. A `docker-compose.yml` example
165
+ ships in the repo root — see [docs/DOCKER.md](docs/DOCKER.md) for the
166
+ full reference (auth flows, volume layout, reverse-proxy / TLS, pinning
167
+ agent CLI versions).
168
+
169
+ </details>
170
+
171
+ ---
172
+
173
+ ## How People Are Using It
174
+
175
+ - **Run a Swarm in Parallel** — Open N sessions in N dashboard panes (or N IM threads), each running a different agent on a different workspace, all executing simultaneously. One person, many agents, one unified cockpit. Steer any of them at any moment.
176
+ - **Self-Hosted Dev Loop** — pikiloop was built using pikiloop. The dev workflow *is* the product: drive the orchestrator from your phone, write code, ship a release, and iterate.
177
+ - **Walk-Away Coding** — Kick off a massive refactoring task, close your laptop, and monitor/steer it from your phone over Telegram. The agent continues running locally, streaming results back to your chat.
178
+ - **Multi-Agent Tag Team** — Let Claude Code draft an initial implementation, switch to Codex for an in-depth review, and finally hand it over to Gemini for a fresh perspective. Same files, same continuous session history.
179
+ - **Domestic Model Routing** — When latency, cost, or compliance demands a non-frontier model, use a wrapper driver to run Claude Code effortlessly on DeepSeek, Doubao, Qwen, or a fully local Ollama / mlx-lm endpoint.
180
+ - **The Group Chat Agent** — Drop pikiloop into a Feishu, Slack, Discord, or WeCom workgroup. The entire team shares one orchestrator, one project workspace, and a unified set of powerful skills.
181
+ - **Codex-Generated Images On Tap** — Ask Codex to draft a poster, a diagram, a UI mock — the image streams back as a real attachment in the chat with a click-to-reveal Image Prompt so you can audit the exact text that went to the model. Iterate by replying, not by re-opening a browser.
182
+ - **Computer-Use, Controlled by You** — Enable the managed Chrome (Playwright) and macOS desktop (Peekaboo, via Accessibility + ScreenCaptureKit) capabilities. The agent can suddenly `see` the screen, click, type, and manage windows, menus, and the Dock—while you steer it from your phone. Book a meeting, scrape a complex dashboard, run end-to-end tests, or drive any native macOS application.
183
+ - **Skill-Driven Workflows** — Install community skills (`promote`, `snipe`, `review`, `security-review`, etc.) once, and trigger them instantly from any connected terminal using `/sk_<name>`.
184
+
185
+ ---
186
+
187
+ ## Core Features
188
+
189
+ ### Terminal Layer
190
+
191
+ - **Seven Native IM Channels** — Telegram, Feishu, WeChat (personal), Slack, Discord, DingTalk, and WeCom. Run one, several, or all of them simultaneously. Each channel is strictly isolated at the code level; adding a new one (WhatsApp, a mobile app, voice) requires zero changes to the others.
192
+ - **Web Dashboard** — Drive sessions directly from your browser with the exact same conversational flow, tool-use tracing, and streaming experience as IM. Multi-pane workspace (1/2/3/6 panes), light/dark themes, and full EN/中文 i18n.
193
+ - **Live Streaming Preview** — Watch messages update in place as the agent thinks. Long text auto-splits cleanly; thinking traces, tool calls, and plans surface as collapsible cards; images and files stream back to the UI in real time.
194
+ - **Queue & Steer From One Composer** — Send while the stream is still running. New messages line up as queued chips you can preview, recall, or hand-steer; one click stops the active turn AND drains the rest of the queue.
195
+
196
+ ### Agent Layer
197
+
198
+ - **Official CLIs as Drivers** — Powered directly by Claude Code, Codex CLI, Gemini CLI, and Hermes (via ACP). We don't rewrite the agent core—you inherit upstream capabilities and Day-0 updates automatically.
199
+ - **ACP-Native Architecture** — Hermes integrates natively through the [Agent Client Protocol](https://agentclientprotocol.com), spawning `hermes acp` over JSON-RPC stdio. Any future ACP-compatible agent plugs in the exact same way.
200
+ - **Pluggable Driver Registry** — The only contract is `src/agent/driver.ts`. New CLI- or ACP-based agents can drop right in alongside our four built-in drivers.
201
+ - **Per-Session Agent Switching** — Swap the "brain" on the fly without leaving your workspace; the same conversation history follows you to the next agent.
202
+ - **Steer & Interrupt** — Interrupt a heavy running task and force a queued message to the front of the line, or stop everything for this session in one click.
203
+ - **Codex Human-in-the-Loop** — When Codex pauses to ask you a question, the prompt is forwarded to your active terminal (IM or Dashboard). Reply inline and the task resumes seamlessly.
204
+ - **Persistent Goals, Routed by Agent** — `/goal <objective>` keeps a session working toward a target until the agent self-audits completion. Codex uses its native `thread/goal/*` RPC with optional `budget=N` tokens and full pause/resume; Claude uses its in-process Stop hook with a Haiku judge and auto-clears when the condition is met; other agents fall back to pikiloop's portable continuation loop.
205
+ - **Image Generation, Surfaced End-to-End** — Codex's built-in `image_gen` tool (and Claude MCP / Gemini Imagen sources) lands as a real image attachment in the chat — not a wall of base64. The agent's actual `revised_prompt` rides along as a click-to-reveal **Image Prompt** disclosure in the Dashboard, so you can audit *why* the model drew what it drew. A "Generating image…" chip ticks alongside the assistant turn while the call is in flight.
206
+
207
+ ### Model Layer
208
+
209
+ - **Frontier + Domestic + Local + Proxies** — Frontier (Claude · GPT-5/Codex · Gemini), Chinese domestic (DeepSeek · Doubao · MiMo · MiniMax · Qwen), local runtimes (Ollama, mlx-lm on Apple Silicon), OpenRouter, and any custom OpenAI-compatible proxy.
210
+ - **Providers & Profiles Vault** — Credentials are isolated in `~/.pikiloop/setting.json`. Browse a read-only `models.dev` catalog, validate keys with real provider probes, and bind a Profile to an agent for automatic environment injection at spawn time.
211
+ - **Local Models, Zero-Config Attach** — Detected Ollama or mlx-lm backends auto-attach as a Provider — no extra wiring. The Dashboard tile shows status, install hints (brew/pipx), the exact `ollama pull` / `mlx_lm.server` command, and RAM headroom warnings against the host's total memory.
212
+ - **Per-Session Model & Reasoning Effort** — Switch models or reasoning effort live via the Dashboard, `/models`, or `/mode`. Effort levels are per-agent (Claude: low → max; Codex: low → very high; Hermes: minimal → very high).
213
+ - **Per-Agent Deep Injection** — `resolveAgentInjection(agentId)` forces the bound Profile's env vars down at spawn time. Run Claude Code on top of DeepSeek, Doubao, or a local Ollama model without ever editing the upstream client's config.
214
+
215
+ ### Tool Layer
216
+
217
+ - **Robust Skills System** — Project skills live in `.pikiloop/skills/*/SKILL.md` (legacy `.claude/commands/*.md` still works). Install community packs in one click from GitHub (`owner/repo`) or pick from our curated set (Anthropic Official, Vercel Agent Skills, etc.). Trigger anywhere with `/skills` and `/sk_<name>`.
218
+ - **Massive MCP Server Ecosystem** — Browse the [MCP Registry](https://registry.modelcontextprotocol.io), add custom stdio or HTTP servers, enforce real-handshake health checks, and authenticate with OAuth 2.1 + Dynamic Client Registration. The recommended catalog covers GitHub, Atlassian, Notion, Linear, Sentry, Cloudflare, Slack, Feishu/Lark, Stripe, Hugging Face, Gamma, Brave Search, Perplexity, Filesystem, SQLite, and PostgreSQL — plus two built-in computer-use servers we ship ourselves: `pikiloop-browser` (Chrome via Playwright) and `peekaboo` (macOS GUI via Peekaboo).
219
+ - **Seamless CLI Tool Integration** — Auto-detects versions and authentication state for popular CLIs (gh, brew, npm, uv, …). OAuth-web login handoffs route through the agent's normal tool surface.
220
+ - **Session-Scoped MCP Bridge** — Foundational tools (`im_list_files`, `im_send_file`, `im_ask_user`, `goal_get`, `goal_update`) plus the managed browser and macOS desktop tools (when enabled) are auto-injected into every session you launch.
221
+ - **Three-Way Merge Resolution** — Scope precedence is simple: `global < workspace < built-in`. The engine resolves and merges these silently for every session.
222
+
223
+ ### Runtime & Developer Experience
224
+
225
+ - **Dedicated Session Workspaces** — Every session gets its own isolated directory; uploaded files and generated assets (including agent-produced images) drop there automatically.
226
+ - **Resume, Switch, and Classify** — Multi-turn conversations resume cleanly. Sessions are auto-classified (answer, proposal, implementation, blocked) and the workspace list sorts by recent activity across all installed agents.
227
+ - **Auto-Injected Base Tools** — `im_*` (file listing, sending, asking the user) and `goal_*` tools are hard-wired into every stream — the agent can hand a file back to your IM or pause to ask a question without you wiring anything up.
228
+ - **Computer-Use (Browser Engine)** — The built-in `pikiloop-browser` MCP wraps `@playwright/mcp` with a process-level supervisor and a shared, isolated Chrome profile. Log in to your tools once and reuse those authenticated sessions across every future task.
229
+ - **Computer-Use (macOS Desktop)** — Enable the `peekaboo` MCP server (macOS only) to unleash the [Peekaboo](https://peekaboo.sh/) framework over Accessibility and ScreenCaptureKit. Tools include `see`, `click`, `type`, `scroll`, `window`, `menu`, `app`, `dock`, plus the `agent` sub-agent for goal-directed control. Requires Accessibility + Screen Recording permission in System Settings.
230
+ - **Hardened for Long Tasks** — Sleep prevention, watchdog timers, auto-restart, daemon mode, and a channel supervisor. Restart is blocked while tasks are active so a hot reload never kills your marathon job.
231
+
232
+ ---
233
+
234
+ ## How Is This Different?
235
+
236
+ | Feature | pikiloop | IDE Assistants<br>(Cursor / Windsurf / Aider) | Cloud Agents<br>(Devin / Web Claude) | Single-Agent IM Bots |
237
+ |---|---|---|---|---|
238
+ | **Terminal Access** | 7 IM channels + Web + Extensible | Locked inside the IDE | Confined to a Web app | One specific IM app |
239
+ | **Execution Environment** | Your local machine | Your local machine | Vendor's remote sandbox | Usually vendor servers |
240
+ | **Agent Flexibility** | Claude Code, Codex, Gemini, Hermes (ACP), etc. | Locked in | Single | Single |
241
+ | **Model Freedom** | Frontier · Chinese domestic · local (Ollama, mlx-lm) · OpenAI-compatible proxies | Controlled by the platform | Controlled by the vendor | Single, hardcoded |
242
+ | **Concurrency Power** | **N Agents × N Windows × N Workspaces** | One agent per IDE window | Strictly sequential | Single thread |
243
+ | **Files & Tools Access** | Your entire local disk, your MCPs, your CLIs | Local project files | Heavily sandboxed | None or extremely limited |
244
+ | **Add a New Terminal** | Drop in a simple `Channel` class | Impossible | Impossible | Requires a hard fork |
245
+ | **Add a New Agent** | Implement a simple `AgentDriver` (CLI or ACP) | Impossible | Impossible | Requires a hard fork |
246
+ | **Self-Bootstrapping** | **Yes — completely built using itself** | No | No | No |
247
+
248
+ The shape that truly matters: **You never have to leave your preferred environment, you retain total choice over the "brain", you can drive a massive swarm in parallel, and the orchestrator is the exact same tool we use to build the orchestrator.**
249
+
250
+ ---
251
+
252
+ ## Command Reference
253
+
254
+ | Command | Description |
255
+ |---|---|
256
+ | `/start` | View entry info, the active agent, and your working directory |
257
+ | `/sessions` | View, switch, or create new sessions |
258
+ | `/agents` | Switch the active Agent (Claude · Codex · Gemini · Hermes) |
259
+ | `/models` | View and switch the model or reasoning effort for the session |
260
+ | `/mode` | Toggle plan mode / reasoning effort |
261
+ | `/switch` | Browse and switch the working directory |
262
+ | `/workspaces` | Pick a saved workspace from the Dashboard's quick-pick list |
263
+ | `/goal` | Set or inspect a long-running, self-terminating session goal |
264
+ | `/stop` | Force-stop the current session |
265
+ | `/status` | Check runtime status, token usage, resource consumption, and session info |
266
+ | `/host` | Monitor host CPU, memory, disk, and battery levels |
267
+ | `/skills` | Browse available project skills |
268
+ | `/ext` | View the extensions overview |
269
+ | `/restart` | Restart and re-launch the underlying Bot service |
270
+ | `/sk_<name>` | Instantly run a specific project skill |
271
+
272
+ *Note: Plain text without a slash is forwarded directly to the current agent.*
273
+
274
+ ---
275
+
276
+ ## Configuration
277
+
278
+ - **Persistent Configuration:** `~/.pikiloop/setting.json` stores your channels, agents, Providers/Profiles, workspaces, and MCP extensions.
279
+ - The **Dashboard** is the primary UI for configuration. The terminal wizard (`--setup`) and the doctor script (`--doctor`) are available for headless or CLI-first users.
280
+ - Global MCP extensions are stored under the `extensions.mcp` key in the setting file.
281
+ - Workspace MCP extensions follow standard conventions and are read from `.mcp.json` in the project root.
282
+ - Project skills are loaded automatically from `.pikiloop/skills/*/SKILL.md` (and we also support legacy `.claude/commands/*.md` formats).
283
+
284
+ **Computer-Use Toggles** (managed via the Extensions dashboard):
285
+
286
+ - `browserEnabled` — Enables managed Chrome (Playwright). Upon first use, pikiloop creates a dedicated profile in `~/.pikiloop` and reuses it for subsequent sessions. Log in once, and never scan a QR code or enter a password for those tools again.
287
+ - `peekabooEnabled` — Enables macOS desktop automation (Peekaboo). Available on macOS only. Activating this launches `@steipete/peekaboo`'s `peekaboo-mcp` binary and injects its UI-controlling tools. *Note: You must grant your terminal **Accessibility** and **Screen Recording** permissions in System Settings → Privacy & Security before enabling this.*
288
+
289
+ ---
290
+
291
+ ## Roadmap
292
+
293
+ - **SupporterAgent** — A high-level meta-agent layered on top of the existing orchestration stack (Terminals × Agents × Models × Tools). It takes a complex objective and centrally owns the full loop: decomposition and planning, scheduling the right sub-agents on the right models with the right tools, watching their streams as they run, and stepping in to correct course when a sub-agent stalls, drifts, or contradicts the plan. The aim is a step-change in how reliably pikiloop can drive long-horizon, multi-agent work without a human babysitting every turn.
294
+
295
+ ---
296
+
297
+ ## Development
298
+
299
+ ```bash
300
+ git clone https://github.com/xiaotonng/pikiloop.git
301
+ cd pikiloop
302
+ npm install
303
+ npm run build
304
+ npm test
305
+ ```
306
+
307
+ ```bash
308
+ npm run dev # Start local dev server (--no-daemon, logs to ~/.pikiloop/dev/dev.log)
309
+ npm run build # Production build (Dashboard + tsc)
310
+ npm test # Run Vitest suite
311
+ npx pikiloop@latest --doctor # Environment health check
312
+ ```
313
+
314
+ For deep dives into the architecture and integration, see: [ARCHITECTURE.md](ARCHITECTURE.md) · [INTEGRATION.md](INTEGRATION.md) · [TESTING.md](TESTING.md).
315
+
316
+ ---
317
+
318
+ ## Contributing
319
+
320
+ Every layer of this project was designed from the ground up to be **extended**. Adding a new terminal, writing a new agent driver, wrapping a new model, or building a killer MCP tool—these are all first-class contributions.
321
+
322
+ - Read the **[Contributing Guide](CONTRIBUTING.md)** to get started.
323
+ - Check out issues tagged with [`good first issue`](https://github.com/xiaotonng/pikiloop/labels/good%20first%20issue) and [`help wanted`](https://github.com/xiaotonng/pikiloop/labels/help%20wanted).
324
+ - For major architectural changes, please open an issue first to align on the technical approach.
325
+
326
+ | Module | What You Can Extend |
327
+ |---|---|
328
+ | `src/agent/driver.ts`, `src/agent/drivers/*.ts`, `src/agent/acp-client.ts` | Add a new Agent Driver (CLI-based or ACP-compatible) |
329
+ | `src/channels/base.ts`, `src/channels/*/` | Integrate a new Terminal or IM channel |
330
+ | `src/model/`, `src/model/injector.ts` | Add a new model provider or customize agent environment injection rules |
331
+ | `src/dashboard/routes/*.ts` | Expand the Dashboard backend API |
332
+ | `src/agent/mcp/tools/*.ts`, `src/agent/mcp/bridge.ts` | Add new session-scoped MCP tools |
333
+ | `src/catalog/*.ts` | Recommend high-quality MCP servers, CLI tools, or Skill repositories |
334
+
335
+ ---
336
+
337
+ ## Community & Contact
338
+
339
+ Questions, feedback, or want to compare notes on agent orchestration? Add me on WeChat: **18317014390** (please note `pikiloop` when you reach out).
340
+
341
+ ---
342
+
343
+ ## Star History
344
+
345
+ <a href="https://www.star-history.com/#xiaotonng/pikiloop&Date">
346
+ <img src="https://api.star-history.com/svg?repos=xiaotonng/pikiloop&type=Date" alt="Star History" width="640">
347
+ </a>
348
+
349
+ ---
350
+
351
+ ## License
352
+
353
+ [MIT](LICENSE) — Built in the open. Use it, fork it, and plug in your own layers.