Skip to content

Commit 60aa02d

Browse files
committed
Update CI and README for OSS best practices
- Add UV_DEFAULT_INDEX and UV_INDEX_URL env vars to CI for public PyPI - Simplify agent rules section to be Claude Code-specific - Add note that other agents like Amp may not need extra config - Move "Why MCP" section to bottom of README - Convert CLI vs MCP diagram to Mermaid flowchart - Use @latest for all uvx commands
1 parent eec52fe commit 60aa02d

File tree

2 files changed

+55
-66
lines changed

2 files changed

+55
-66
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
run: uv python install ${{ matrix.python-version }}
2424

2525
- name: Install dependencies
26+
env:
27+
UV_DEFAULT_INDEX: https://pypi.org/simple
28+
UV_INDEX_URL: https://pypi.org/simple
2629
run: uv sync --all-extras
2730

2831
- name: Lint with ruff

README.md

Lines changed: 52 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ With the queue:
9696
## Installation
9797

9898
```bash
99-
uvx agent-task-queue
99+
uvx agent-task-queue@latest
100100
```
101101

102102
That's it. [uvx](https://docs.astral.sh/uv/guides/tools/) runs the package directly from PyPI—no clone, no install, no virtual environment.
@@ -110,7 +110,7 @@ Agent Task Queue works with any AI coding tool that supports MCP. Add this confi
110110
"mcpServers": {
111111
"agent-task-queue": {
112112
"command": "uvx",
113-
"args": ["agent-task-queue"]
113+
"args": ["agent-task-queue@latest"]
114114
}
115115
}
116116
}
@@ -124,7 +124,7 @@ Agent Task Queue works with any AI coding tool that supports MCP. Add this confi
124124
Install via CLI:
125125

126126
```bash
127-
amp mcp add agent-task-queue -- uvx agent-task-queue
127+
amp mcp add agent-task-queue -- uvx agent-task-queue@latest
128128
```
129129

130130
Or add to `.amp/settings.json` (workspace) or global settings. See [Amp Manual](https://ampcode.com/manual) for details.
@@ -137,7 +137,7 @@ Or add to `.amp/settings.json` (workspace) or global settings. See [Amp Manual](
137137
Install via CLI (<a href="https://docs.anthropic.com/en/docs/claude-code/mcp">guide</a>):
138138

139139
```bash
140-
claude mcp add agent-task-queue -- uvx agent-task-queue
140+
claude mcp add agent-task-queue -- uvx agent-task-queue@latest
141141
```
142142

143143
</details>
@@ -177,7 +177,7 @@ Config file locations:
177177
"agent-task-queue": {
178178
"type": "stdio",
179179
"command": "uvx",
180-
"args": ["agent-task-queue"]
180+
"args": ["agent-task-queue@latest"]
181181
}
182182
}
183183
}
@@ -251,15 +251,11 @@ run_task(
251251
)
252252
```
253253

254-
### Important: Configure Agent Rules
254+
### Note for Claude Code Users
255255

256-
**The MCP tool won't be used automatically.** AI agents default to their built-in shell/Bash tools. You must add explicit instructions telling the agent to use `run_task` instead.
256+
Claude Code defaults to its built-in Bash tool for shell commands. To ensure it uses `run_task` instead, add instructions to your `CLAUDE.md` file.
257257

258-
Without these rules, the agent will bypass the queue entirely and run builds directly via Bash, defeating the purpose of this tool.
259-
260-
#### Claude Code
261-
262-
Add to `~/.claude/CLAUDE.md` (applies to all projects) or `.claude/CLAUDE.md` (project-specific):
258+
Add to `~/.claude/CLAUDE.md` (global) or `.claude/CLAUDE.md` (project-specific):
263259

264260
```markdown
265261
## Build Queue
@@ -281,57 +277,8 @@ For expensive build commands, ALWAYS use the `run_task` MCP tool instead of Bash
281277
NEVER run these commands directly via Bash. Always use the run_task MCP tool to prevent resource contention.
282278
```
283279

284-
#### Cursor
285-
286-
Add to `.cursorrules` in your project root:
287-
288-
```markdown
289-
## Build Queue
290-
291-
For expensive build commands (gradle, bazel, docker, pytest, npm build), ALWAYS use the `run_task` MCP tool instead of running shell commands directly.
292-
293-
Parameters:
294-
- command: The full shell command to run
295-
- working_directory: Absolute path to the project root
296-
- queue_name: Optional queue name for isolation (default: "global")
297-
- env_vars: Optional environment variables in "KEY=value,KEY2=value2" format
298-
299-
This ensures builds are queued and don't compete for system resources.
300-
```
301-
302-
#### Other Agents
303-
304-
Add similar instructions to your agent's configuration file (`.windsurfrules`, `AGENTS.md`, etc.) telling it to use `run_task` for build commands.
305-
306-
## Why MCP Instead of a CLI Tool?
307-
308-
The first attempt at solving this problem was a file-based queue CLI that wrapped commands:
309-
310-
```bash
311-
queue-cli ./gradlew build
312-
```
313-
314-
**The fatal flaw:** AI tools have built-in shell timeouts (30s-120s). If a job waited in queue longer than the timeout, the agent gave up—even though the job would eventually run.
315-
316-
```
317-
CLI Approach: MCP Approach:
318-
Agent → Shell → cli → queue Agent → MCP Protocol → Server → queue
319-
↑ ↓
320-
└── TIMEOUT! ────────── (blocks until complete, no timeout)
321-
```
322-
323-
**Why MCP solves this:**
324-
- The MCP server keeps the connection alive indefinitely
325-
- The agent's tool call blocks until the task completes
326-
- No timeout configuration needed—it "just works"
327-
- The server manages the queue; the agent just waits
328-
329-
| Aspect | CLI Wrapper | Agent Task Queue |
330-
|--------|-------------|----------------|
331-
| Timeout handling | External workarounds | Solved by design |
332-
| Queue storage | Filesystem | SQLite (WAL mode) |
333-
| Integration | Wrap every command | Automatic tool selection |
334-
| Agent compatibility | Varies by tool | Universal |
280+
> [!NOTE]
281+
> Other agents like Amp may automatically use MCP tools without additional configuration.
335282
336283
## Configuration
337284

@@ -353,7 +300,7 @@ Pass options via the `args` property in your MCP config:
353300
"agent-task-queue": {
354301
"command": "uvx",
355302
"args": [
356-
"agent-task-queue",
303+
"agent-task-queue@latest",
357304
"--max-output-files=100",
358305
"--lock-timeout=60"
359306
]
@@ -362,7 +309,7 @@ Pass options via the `args` property in your MCP config:
362309
}
363310
```
364311

365-
Run `uvx agent-task-queue --help` to see all options.
312+
Run `uvx agent-task-queue@latest --help` to see all options.
366313

367314
## Architecture
368315

@@ -479,7 +426,7 @@ tail -f /tmp/agent-task-queue/agent-task-queue-logs.json # Follow live
479426
### Server not connecting
480427

481428
1. Ensure `uvx` is in your PATH (install [uv](https://github.com/astral-sh/uv) if needed)
482-
2. Test manually: `uvx agent-task-queue`
429+
2. Test manually: `uvx agent-task-queue@latest`
483430

484431
## Development
485432

@@ -498,6 +445,45 @@ uv run python task_queue.py # Run server locally
498445
- macOS
499446
- Linux
500447

448+
## Why MCP Instead of a CLI Tool?
449+
450+
The first attempt at solving this problem was a file-based queue CLI that wrapped commands:
451+
452+
```bash
453+
queue-cli ./gradlew build
454+
```
455+
456+
**The fatal flaw:** AI tools have built-in shell timeouts (30s-120s). If a job waited in queue longer than the timeout, the agent gave up—even though the job would eventually run.
457+
458+
```mermaid
459+
flowchart LR
460+
subgraph cli [CLI Approach]
461+
A1[Agent] --> B1[Shell]
462+
B1 --> C1[CLI]
463+
C1 --> D1[Queue]
464+
B1 -.-> |"⏱️ TIMEOUT!"| A1
465+
end
466+
467+
subgraph mcp [MCP Approach]
468+
A2[Agent] --> |MCP Protocol| B2[Server]
469+
B2 --> C2[Queue]
470+
B2 -.-> |"✓ blocks until complete"| A2
471+
end
472+
```
473+
474+
**Why MCP solves this:**
475+
- The MCP server keeps the connection alive indefinitely
476+
- The agent's tool call blocks until the task completes
477+
- No timeout configuration needed—it "just works"
478+
- The server manages the queue; the agent just waits
479+
480+
| Aspect | CLI Wrapper | Agent Task Queue |
481+
|--------|-------------|----------------|
482+
| Timeout handling | External workarounds | Solved by design |
483+
| Queue storage | Filesystem | SQLite (WAL mode) |
484+
| Integration | Wrap every command | Automatic tool selection |
485+
| Agent compatibility | Varies by tool | Universal |
486+
501487
## License
502488

503489
Apache 2.0

0 commit comments

Comments
 (0)