agent-pool-mcp 1.3.0 → 1.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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/scheduler/daemon.js +5 -5
- package/src/scheduler/pipeline.js +4 -4
- package/src/scheduler/scheduler.js +3 -3
- package/src/server.js +1 -1
- package/src/tool-definitions.js +1 -1
package/README.md
CHANGED
|
@@ -282,7 +282,7 @@ src/
|
|
|
282
282
|
- **Live Events**: Progress polling uses a ring buffer to show the latest activity without overwhelming context.
|
|
283
283
|
- **Depth Tracking**: Nested orchestration support with optional `AGENT_POOL_MAX_DEPTH` limit.
|
|
284
284
|
- **Adaptive Polling**: Pipeline daemon uses 3s intervals when active, 30s when idle.
|
|
285
|
-
- **File-Based Communication**: Pipeline agents communicate through `.
|
|
285
|
+
- **File-Based Communication**: Pipeline agents communicate through `.agents/runs/` JSON files — each Gemini process has its own MCP server instance but shares state via filesystem.
|
|
286
286
|
|
|
287
287
|
## License
|
|
288
288
|
|
package/package.json
CHANGED
package/src/scheduler/daemon.js
CHANGED
|
@@ -17,9 +17,9 @@ import { join, dirname } from 'node:path';
|
|
|
17
17
|
import { matchesCron } from './cron.js';
|
|
18
18
|
|
|
19
19
|
const POLL_INTERVAL_MS = 30_000; // Check schedules every 30 seconds
|
|
20
|
-
const PID_FILE = '.
|
|
21
|
-
const SCHEDULE_FILE = '.
|
|
22
|
-
const RESULTS_DIR = '.
|
|
20
|
+
const PID_FILE = '.agents/scheduler.pid';
|
|
21
|
+
const SCHEDULE_FILE = '.agents/schedule.json';
|
|
22
|
+
const RESULTS_DIR = '.agents/scheduled-results';
|
|
23
23
|
|
|
24
24
|
/** @type {string} */
|
|
25
25
|
const cwd = process.argv[2] || process.cwd();
|
|
@@ -163,8 +163,8 @@ function executeSchedule(schedule) {
|
|
|
163
163
|
|
|
164
164
|
import { readdirSync } from 'node:fs';
|
|
165
165
|
|
|
166
|
-
const PIPELINES_DIR = '.
|
|
167
|
-
const RUNS_DIR = '.
|
|
166
|
+
const PIPELINES_DIR = '.agents/pipelines';
|
|
167
|
+
const RUNS_DIR = '.agents/runs';
|
|
168
168
|
|
|
169
169
|
/**
|
|
170
170
|
* Spawn a Gemini CLI agent for a pipeline step.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pipeline management — CRUD for pipeline definitions and run state.
|
|
3
3
|
*
|
|
4
|
-
* Pipelines are stored as JSON templates in .
|
|
5
|
-
* Each execution creates a run state in .
|
|
4
|
+
* Pipelines are stored as JSON templates in .agents/pipelines/.
|
|
5
|
+
* Each execution creates a run state in .agents/runs/.
|
|
6
6
|
*
|
|
7
7
|
* @module agent-pool/scheduler/pipeline
|
|
8
8
|
*/
|
|
@@ -12,8 +12,8 @@ import { join, dirname } from 'node:path';
|
|
|
12
12
|
import { randomUUID } from 'node:crypto';
|
|
13
13
|
import { ensureDaemon } from './scheduler.js';
|
|
14
14
|
|
|
15
|
-
const PIPELINES_DIR = '.
|
|
16
|
-
const RUNS_DIR = '.
|
|
15
|
+
const PIPELINES_DIR = '.agents/pipelines';
|
|
16
|
+
const RUNS_DIR = '.agents/runs';
|
|
17
17
|
|
|
18
18
|
// ─── Helpers ────────────────────────────────────────────────
|
|
19
19
|
|
|
@@ -15,9 +15,9 @@ import { nextCronRun } from './cron.js';
|
|
|
15
15
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
16
16
|
const DAEMON_SCRIPT = join(__dirname, 'daemon.js');
|
|
17
17
|
|
|
18
|
-
const SCHEDULE_FILE = '.
|
|
19
|
-
const RESULTS_DIR = '.
|
|
20
|
-
const PID_FILE = '.
|
|
18
|
+
const SCHEDULE_FILE = '.agents/schedule.json';
|
|
19
|
+
const RESULTS_DIR = '.agents/scheduled-results';
|
|
20
|
+
const PID_FILE = '.agents/scheduler.pid';
|
|
21
21
|
|
|
22
22
|
// ─── Schedule CRUD ──────────────────────────────────────────
|
|
23
23
|
|
package/src/server.js
CHANGED
|
@@ -422,7 +422,7 @@ function handleScheduleTask(args) {
|
|
|
422
422
|
return {
|
|
423
423
|
content: [{
|
|
424
424
|
type: 'text',
|
|
425
|
-
text: `⏰ Task scheduled.\n\n- **Schedule ID**: \`${result.scheduleId}\`\n- **Cron**: \`${args.cron}\`\n- **Next run**: ${result.nextRun || 'unknown'}\n- **Prompt**: ${args.prompt.substring(0, 100)}...\n\nDaemon is running in the background. Results will be saved to \`.
|
|
425
|
+
text: `⏰ Task scheduled.\n\n- **Schedule ID**: \`${result.scheduleId}\`\n- **Cron**: \`${args.cron}\`\n- **Next run**: ${result.nextRun || 'unknown'}\n- **Prompt**: ${args.prompt.substring(0, 100)}...\n\nDaemon is running in the background. Results will be saved to \`.agents/scheduled-results/\`.\nUse \`list_schedules\` to see all schedules, \`get_scheduled_results\` to read outputs.`,
|
|
426
426
|
}],
|
|
427
427
|
};
|
|
428
428
|
} catch (error) {
|
package/src/tool-definitions.js
CHANGED
|
@@ -199,7 +199,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
199
199
|
description: [
|
|
200
200
|
'Schedule a Gemini CLI agent to run on a cron schedule or as a delayed one-shot.',
|
|
201
201
|
'Spawns a persistent daemon that survives IDE/CLI restarts.',
|
|
202
|
-
'Results are saved to .
|
|
202
|
+
'Results are saved to .agents/scheduled-results/ and can be retrieved with get_scheduled_results.',
|
|
203
203
|
'',
|
|
204
204
|
'Cron format: standard 5-field (minute hour day month weekday).',
|
|
205
205
|
'Examples: "*/30 * * * *" (every 30 min), "0 9 * * MON-FRI" (9am weekdays), "0 */2 * * *" (every 2 hours).',
|