Plugin-first coding agent monorepo with a reusable engine, an interactive CLI, and a sandboxed JavaScript execution package.
- English README (this file)
- 中文文档:
README-CN.md
This is a pnpm workspace monorepo:
| Path | Purpose |
|---|---|
packages/engine |
Core agent runtime (pulse-coder-engine): loop, tools, plugin manager, built-in plugins |
packages/cli |
Interactive terminal app (pulse-coder-cli) built on top of the engine |
packages/pulse-sandbox |
Isolated JS executor + run_js tool adapter |
apps/pulse-agent-test |
Lightweight integration checks for engine usage |
apps/coder-demo |
Older/experimental demo app |
apps/remote-server |
Optional HTTP service wrapper around the engine |
docs/, architecture/ |
Design and architecture documents |
Note:
packages/engine-plugins/currently exists but is empty (reserved/legacy directory).
Engine.initialize() creates a PluginManager, loads built-in plugins by default, then merges tools from:
- built-in tools,
- plugin-registered tools,
- user-supplied tools (
EngineOptions.tools, highest priority).
The engine has two loading tracks:
- Engine plugins (code plugins, with lifecycle and hook registration)
- User config plugins (
config.{json|yaml|yml}scanning; currently mostly parsed/validated/logged)
Engine plugin scan paths include:
.pulse-coder/engine-plugins.coder/engine-plugins(legacy compatible)~/.pulse-coder/engine-plugins~/.coder/engine-plugins
Core loop (packages/engine/src/core/loop.ts) supports:
- streaming text/tool events,
- tool call hooks (
beforeToolCall/afterToolCall), - LLM call hooks (
beforeLLMCall/afterLLMCall), - 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 legacy.coder/mcp.json), exposes tools asmcp_<server>_<tool>.built-in-skills: scansSKILL.mdfiles and exposes askilltool.built-in-plan-mode: supportsplanning/executingmode with prompt-level policy injection and eventing.built-in-task-tracking: addstask_create/task_get/task_list/task_updatetools with local JSON 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-based abort while streaming,
- clarification interaction via
clarifytool, - built-in
run_jstool frompulse-sandbox.
Default toolset includes:
read,write,edit,grep,ls,bash,tavily,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 a local .env at repo root (no root .env.example is currently shipped):
OPENAI_API_KEY=your_key_here
OPENAI_MODEL=gpt-4o-mini
OPENAI_API_URL=https://api.openai.com/v1
# Optional
# TAVILY_API_KEY=...
# USE_ANTHROPIC=true
# ANTHROPIC_API_KEY=...pnpm run buildpnpm startInside 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": {
"my_server": {
"url": "http://localhost:3060/mcp/server"
}
}
}Create .pulse-coder/skills/<skill-name>/SKILL.md with frontmatter:
---
name: my-skill
description: What this skill helps with
---
# Instructions
...Create .pulse-coder/agents/<agent-name>.md with frontmatter:
---
name: code-reviewer
description: Specialized code review helper
---
System prompt content here.Legacy
.coder/...paths are still supported for compatibility.
import { Engine } from 'pulse-coder-engine';
import { createOpenAI } from '@ai-sdk/openai';
const provider = createOpenAI({ apiKey: process.env.OPENAI_API_KEY! });
const engine = new Engine({
llmProvider: provider.responses,
model: process.env.OPENAI_MODEL || 'gpt-4o-mini',
systemPrompt: { append: 'Prefer minimal diffs and keep tests green.' }
});
await engine.initialize();
const context = {
messages: [{ role: 'user', content: 'Review this module and propose a refactor plan.' }]
};
const answer = await engine.run(context);
console.log(answer);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-agent-test testCurrent test status in this repo:
pnpm test(packages) passes.pnpm run test:appscurrently fails becauseapps/coder-demostill has 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.
- Some legacy helper scripts (
build.sh,quick-start.sh) still reference older package naming/layout. Preferpnpmscripts frompackage.json. userConfigPluginsloading is implemented, but many config sections are currently logged rather than fully materialized into runtime behavior.