agent-pool-mcp 1.2.0 → 1.2.1

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # agent-pool-mcp
2
2
 
3
- **MCP server for multi-agent orchestration** — parallel task delegation and cross-model peer review via [Gemini CLI](https://github.com/google-gemini/gemini-cli).
3
+ **MCP server for multi-agent orchestration** — parallel task delegation, sequential pipelines, cron scheduling, and cross-model peer review via [Gemini CLI](https://github.com/google-gemini/gemini-cli).
4
4
 
5
5
  > Developed by [RND-PRO](https://rnd-pro.com)
6
6
 
@@ -38,6 +38,60 @@ When the primary agent and Gemini workers are **different foundation models** (e
38
38
  - **`get_task_result`** — Poll task status, retrieve results, and see live progress (last 200 tool/message events).
39
39
  - **`cancel_task`** — Kill a running task and its entire process group immediately.
40
40
 
41
+ ### 🔗 Pipelines — Sequential Task Chains
42
+ Define multi-step workflows where agents execute sequentially, with automatic handoff:
43
+
44
+ ```
45
+ ┌─ frontend ─┐
46
+ research ─┤ ├── deploy
47
+ └─ backend ─┘
48
+ ```
49
+
50
+ - **`create_pipeline`** — Define a pipeline with named steps, triggers, and timeouts.
51
+ - **`run_pipeline`** — Start executing a pipeline. A detached daemon manages the lifecycle.
52
+ - **`list_pipelines`** — See all definitions, active runs, and recent completions.
53
+ - **`get_pipeline_status`** — Step-by-step status with emoji indicators.
54
+ - **`cancel_pipeline`** — Stop a running pipeline and kill active step processes.
55
+
56
+ **Agent Signals** (called BY agents running inside pipeline steps):
57
+ - **`signal_step_complete`** — Mark the current step as done. Accepts optional output and `run_id`.
58
+ - **`bounce_back`** — Return task to a previous step with feedback (e.g. "data incomplete"). Supports `maxBounces` limit.
59
+
60
+ **Triggers:**
61
+
62
+ | Trigger | Description |
63
+ |---------|-------------|
64
+ | `on_complete` | Start when a specific step succeeds |
65
+ | `on_complete_all` | Fan-in: start when ALL listed steps succeed |
66
+ | `on_file` | Start when a file appears and the producing process exits |
67
+ | Auto-fallback | Process death without signal → auto-complete/fail |
68
+
69
+ **Example — 3-step pipeline:**
70
+ ```javascript
71
+ // Agent creates the pipeline
72
+ create_pipeline({
73
+ name: "article-workflow",
74
+ steps: [
75
+ { name: "research", prompt: "Research the topic and write notes to research.md" },
76
+ { name: "draft", prompt: "Read research.md and write article draft" },
77
+ { name: "review", prompt: "Review the draft for accuracy and style" }
78
+ ]
79
+ })
80
+
81
+ // Agent starts execution — daemon handles the rest
82
+ run_pipeline({ pipeline_id: "article-workflow" })
83
+ ```
84
+
85
+ ### ⏰ Cron Scheduler
86
+ Schedule agents to run automatically on a cron schedule:
87
+
88
+ - **`schedule_task`** — Schedule a Gemini CLI agent with cron expression (e.g. `0 9 * * MON-FRI`).
89
+ - **`list_schedules`** — See all schedules with next run times and daemon status.
90
+ - **`cancel_schedule`** — Remove a schedule. Daemon auto-exits when no schedules remain.
91
+ - **`get_scheduled_results`** — Retrieve results from past scheduled executions.
92
+
93
+ The scheduler runs as a **detached daemon** that survives IDE/CLI restarts. It uses atomic file locks to prevent duplicate execution when multiple clients are connected.
94
+
41
95
  ### 📋 3-Tier Skill System
42
96
  Skills are Markdown files with YAML frontmatter that extend agent behavior. Agent-pool manages skills in three tiers:
43
97
  1. **Project**: `.gemini/skills/` (local to repo, takes precedence).
@@ -210,11 +264,16 @@ src/
210
264
  │ ├── consult.js ← Peer review via Gemini CLI
211
265
  │ ├── results.js ← Task store + result formatting (TTL cleanup, ring buffer)
212
266
  │ └── skills.js ← 3-tier skill management (project/global/built-in)
213
- └── runner/
214
- ├── config.js ← Runner config loader (local/SSH)
215
- ├── gemini-runner.js ← Process spawning (streaming JSON, depth tracking)
216
- ├── process-manager.js ← PID tracking, system load awareness, group kill
217
- └── ssh.js ← Shell escaping, remote PID tracking
267
+ ├── runner/
268
+ ├── config.js ← Runner config loader (local/SSH)
269
+ ├── gemini-runner.js ← Process spawning (streaming JSON, depth tracking)
270
+ ├── process-manager.js ← PID tracking, system load awareness, group kill
271
+ └── ssh.js ← Shell escaping, remote PID tracking
272
+ └── scheduler/
273
+ ├── cron.js ← Minimal cron expression parser (zero-dependency)
274
+ ├── daemon.js ← Detached daemon: schedule ticks + pipeline lifecycle
275
+ ├── pipeline.js ← Pipeline CRUD, run state, signals, bounce-back
276
+ └── scheduler.js ← Schedule management + daemon spawning
218
277
  ```
219
278
 
220
279
  **Process management:**
@@ -222,7 +281,10 @@ src/
222
281
  - **TTL Cleanup**: Completed task results are purged from memory after 10 minutes.
223
282
  - **Live Events**: Progress polling uses a ring buffer to show the latest activity without overwhelming context.
224
283
  - **Depth Tracking**: Nested orchestration support with optional `AGENT_POOL_MAX_DEPTH` limit.
284
+ - **Adaptive Polling**: Pipeline daemon uses 3s intervals when active, 30s when idle.
285
+ - **File-Based Communication**: Pipeline agents communicate through `.agent/runs/` JSON files — each Gemini process has its own MCP server instance but shares state via filesystem.
225
286
 
226
287
  ## License
227
288
 
228
289
  MIT
290
+
package/index.js CHANGED
@@ -33,6 +33,6 @@ async function startServer() {
33
33
  const server = createServer();
34
34
  const transport = new StdioServerTransport();
35
35
  await server.connect(transport);
36
- console.error('[agent-pool] MCP server v1.2.0 started');
36
+ console.error('[agent-pool] MCP server v1.2.1 started');
37
37
  }
38
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-pool-mcp",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
5
  "description": "MCP Server for multi-agent task delegation and orchestration via Gemini CLI",
6
6
  "main": "index.js",
package/src/server.js CHANGED
@@ -107,7 +107,7 @@ export function createServer() {
107
107
  }
108
108
 
109
109
  const server = new Server(
110
- { name: 'agent-pool', version: '1.2.0' },
110
+ { name: 'agent-pool', version: '1.2.1' },
111
111
  { capabilities: { tools: {} } },
112
112
  );
113
113