Plugin-first coding agent monorepo with a reusable engine, an interactive CLI, and optional server/runtime integrations.
- English docs (this file)
- Chinese docs:
README-CN.md
This repo is a pnpm workspace monorepo:
| Path | Purpose |
|---|---|
packages/engine |
Core runtime (pulse-coder-engine): loop, hooks, built-in tools, plugin manager |
packages/cli |
Interactive terminal app (pulse-coder-cli) built on top of the engine |
packages/pulse-sandbox |
Sandboxed JavaScript executor and run_js tool adapter |
packages/memory-plugin |
Host-side memory plugin/integration service |
apps/remote-server |
Optional HTTP service wrapper around the engine |
apps/pulse-agent-test |
Lightweight integration checks for engine usage |
apps/coder-demo |
Older experimental app |
apps/snake-game |
Static demo page |
docs/, architecture/ |
Design and architecture documents |
Engine.initialize() creates a PluginManager, loads built-in plugins by default, then merges tools in this order:
- built-in tools,
- plugin-registered tools,
- user-supplied tools (
EngineOptions.tools, highest priority).
Two plugin tracks are supported:
- Engine plugins: runtime code plugins with lifecycle + hooks
- User config plugins: scanned config files (
config.{json|yaml|yml})
Engine plugin scan paths:
.pulse-coder/engine-plugins.coder/engine-plugins(legacy)~/.pulse-coder/engine-plugins~/.coder/engine-plugins
Core loop (packages/engine/src/core/loop.ts) provides:
- streaming text/tool events,
- LLM/tool hook pipelines (
before*/after*), - retry with backoff for retryable failures (
429/5xx), - abort handling,
- automatic context compaction.
The engine auto-loads:
built-in-mcp: loads MCP servers from.pulse-coder/mcp.json(or.coder/mcp.json) and exposes tools asmcp_<server>_<tool>.built-in-skills: scansSKILL.mdfiles and exposes theskilltool.built-in-plan-mode: planning/executing mode management.built-in-task-tracking:task_create/task_get/task_list/task_updatewith local persistence.SubAgentPlugin: loads Markdown agent definitions and exposes<name>_agenttools.
pulse-coder-cli adds:
- session persistence under
~/.pulse-coder/sessions, - per-session task-list binding,
- one-shot skill command transformation (
/skills ...), - ESC abort for in-flight responses,
- clarification flow via
clarifytool, - built-in
run_jstool frompulse-sandbox.
apps/remote-server hosts the engine behind HTTP/webhooks for Feishu/Discord (Telegram/Web adapters exist but are not mounted by default).
Key components:
- Entry + server:
apps/remote-server/src/index.tsandapps/remote-server/src/server.ts. - Dispatcher:
apps/remote-server/src/core/dispatcher.tshandles signature verification, fast ack, slash commands, and streaming. - Agent runs:
apps/remote-server/src/core/agent-runner.tsbuilds run context, resolves model overrides, and persists sessions. - Memory:
apps/remote-server/src/core/memory-integration.tsrecords daily logs to~/.pulse-coder/remote-memory. - Sessions:
apps/remote-server/src/core/session-store.tsstores sessions in~/.pulse-coder/remote-sessions. - Worktrees:
apps/remote-server/src/core/worktree/integration.tsstores binding state in~/.pulse-coder/worktree-state. - Internal API:
apps/remote-server/src/routes/internal.tsexposes/internal/agent/runplus Discord gateway status/restart (loopback-only +INTERNAL_API_SECRET). - Tools:
apps/remote-server/src/core/engine-singleton.tsregisters cron, deferred demo, Twitter list fetcher, session summary, and PTC demo tools.
Engine built-ins:
read,write,edit,grep,ls,bash,tavily,gemini_pro_image,clarify
Task tracking plugin adds:
task_create,task_get,task_list,task_update
CLI additionally injects:
run_js(sandboxed JavaScript execution)
- Node.js
>=18 pnpm(workspace manager)
pnpm installCreate .env at repo root:
# OpenAI-compatible provider (default path)
OPENAI_API_KEY=your_key_here
OPENAI_API_URL=https://api.openai.com/v1
OPENAI_MODEL=novita/deepseek/deepseek_v3
# Optional Anthropic path
# USE_ANTHROPIC=true
# ANTHROPIC_API_KEY=...
# ANTHROPIC_API_URL=https://api.anthropic.com/v1
# ANTHROPIC_MODEL=claude-3-5-sonnet-latest
# Optional tools
# TAVILY_API_KEY=...
# GEMINI_API_KEY=...pnpm run buildpnpm startpnpm --filter @pulse-coder/remote-server devInside the CLI:
/help/new [title]/resume <id>/sessions/search <query>/rename <id> <new-title>/delete <id>/clear/compact/skills [list|<name|index> <message>]/status/mode/plan/execute/save/exit
Interactive controls:
Escaborts current response (or cancels pending clarification)Ctrl+Cexits after save
Create .pulse-coder/mcp.json:
{
"servers": {
"remote_http": {
"transport": "http",
"url": "http://localhost:3060/mcp/server"
},
"legacy_sse": {
"transport": "sse",
"url": "https://example.com/sse"
},
"local_stdio": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."],
"cwd": "."
}
}
}Notes:
transportsupportshttp,sse, andstdio.- If
transportis omitted, it defaults tohttpfor backward compatibility. http/sseuseurl(optionalheaders), whilestdiousescommand(+ optionalargs,env,cwd).
Create .pulse-coder/skills/<skill-name>/SKILL.md:
---
name: my-skill
description: What this skill helps with
---
# Instructions
...Optional remote skills config:
.pulse-coder/skills/remote.json
Create .pulse-coder/agents/<agent-name>.md:
---
name: code-reviewer
description: Specialized code review helper
---
System prompt content here.Legacy
.coder/...paths are still supported.
pnpm install
pnpm run build
pnpm run dev
pnpm start
pnpm test
pnpm run test:appspnpm --filter pulse-coder-engine test
pnpm --filter pulse-coder-engine typecheck
pnpm --filter pulse-coder-cli test
pnpm --filter pulse-sandbox test
pnpm --filter pulse-coder-memory-plugin test
pnpm --filter pulse-agent-test test
pnpm --filter @pulse-coder/remote-server devNotes:
pnpm testruns package tests (./packages/*).pnpm run test:appsruns app tests (./apps/*), andapps/coder-democurrently keeps a placeholder test script.
pnpm release
pnpm release:core
pnpm release -- --packages=engine,cli --bump=patch --tag=latestRelease script supports --dry-run, --skip-version, --skip-build, --preid, and package filtering.