@dougbots/avenor-mcp 0.4.1 → 0.5.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 +22 -7
- package/dist/index.js +22 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -86,7 +86,7 @@ SSE mode restricts incoming requests to `localhost` / `127.0.0.1` / `[::1]` orig
|
|
|
86
86
|
|
|
87
87
|
## Tools
|
|
88
88
|
|
|
89
|
-
All
|
|
89
|
+
All seven tools register under the `avenor_` prefix to avoid collisions with other MCP servers.
|
|
90
90
|
|
|
91
91
|
### `avenor_spawn`
|
|
92
92
|
|
|
@@ -109,15 +109,29 @@ Returns `{ run_id, label, supervisor_id }`. The `run_id` is what you pass to the
|
|
|
109
109
|
|
|
110
110
|
### `avenor_status`
|
|
111
111
|
|
|
112
|
-
Get the status of one run, or list all runs.
|
|
112
|
+
Get the status of one run, or list all runs. Use the compact `lifecycle` view for progress and pending permission checks; `full` remains the compatibility default.
|
|
113
113
|
|
|
114
114
|
| Parameter | Required | Description |
|
|
115
115
|
|---|---|---|
|
|
116
116
|
| `run_id` | no | Run ID or label to query. Omit to list all runs. |
|
|
117
|
+
| `view` | no | Response detail: `lifecycle` or `full` (default) |
|
|
117
118
|
| `supervisor_id` | no | Supervisor ID for multi-supervisor setups |
|
|
118
119
|
|
|
119
120
|
Returns a status object (or array) with `status` being one of `running`, `done`, `failed`, `timeout`, or `killed`. When a run is blocked on a permission request, the response includes a `pending_permission` field with the available options.
|
|
120
121
|
|
|
122
|
+
### `avenor_result`
|
|
123
|
+
|
|
124
|
+
Wait for a run to finish and return its bounded final output without transcript or event details.
|
|
125
|
+
|
|
126
|
+
| Parameter | Required | Description |
|
|
127
|
+
|---|---|---|
|
|
128
|
+
| `run_id` | yes | Run ID or label to await |
|
|
129
|
+
| `wait` | no | Wait for a terminal result (default `true`) |
|
|
130
|
+
| `timeout` | no | Maximum time to wait (for example `30s` or `5m`) |
|
|
131
|
+
| `supervisor_id` | no | Supervisor ID for multi-supervisor setups |
|
|
132
|
+
|
|
133
|
+
Terminal responses include `ready: true` and `output` when the backend exposed one. A pending permission returns immediately. If the result wait itself expires, the response has `ready: false` and `timed_out: true` without changing the run.
|
|
134
|
+
|
|
121
135
|
### `avenor_answer_permission`
|
|
122
136
|
|
|
123
137
|
Respond to a permission prompt that paused a run.
|
|
@@ -171,11 +185,12 @@ Returns `{ ok: true, cleaned_up: [...] }`. Use this when you're done with avenor
|
|
|
171
185
|
## Typical workflow
|
|
172
186
|
|
|
173
187
|
1. **Spawn a run:** `avenor_spawn(agent: "codex", repo_dir: "/path/to/project", prompt: "audit the API routes for auth gaps")`
|
|
174
|
-
2. **Check
|
|
175
|
-
3. **If permission requested:** run `avenor_answer_permission` with the option
|
|
176
|
-
4. **
|
|
177
|
-
5. **
|
|
178
|
-
6. **
|
|
188
|
+
2. **Check lifecycle when needed:** `avenor_status(run_id: "<id>", view: "lifecycle")` for progress or pending permissions.
|
|
189
|
+
3. **If permission requested:** run `avenor_answer_permission` with the offered option.
|
|
190
|
+
4. **Retrieve the result:** `avenor_result(run_id: "<id>")` waits and returns the bounded final output.
|
|
191
|
+
5. **Inspect history when needed:** `avenor_events(run_id: "<id>")` returns raw recent events.
|
|
192
|
+
6. **Optional follow-up:** `avenor_follow_up(run_id: "<id>", message: "now write tests for that")`
|
|
193
|
+
7. **Clean up:** `avenor_shutdown()` when you're finished.
|
|
179
194
|
|
|
180
195
|
## Package structure
|
|
181
196
|
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
4
4
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
5
5
|
import { Hono } from "hono";
|
|
6
6
|
import { z } from "zod";
|
|
7
|
-
import { answerPermissionTool, eventsTool, followUpTool, shutdownTool, spawnTool, statusTool } from "@dougbots/avenor-core";
|
|
7
|
+
import { answerPermissionTool, eventsTool, followUpTool, resultTool, shutdownTool, spawnTool, statusTool } from "@dougbots/avenor-core";
|
|
8
8
|
//#region src/mcp.ts
|
|
9
9
|
const LOCALHOST_ORIGINS = new Set([
|
|
10
10
|
"localhost",
|
|
@@ -74,15 +74,33 @@ server.registerTool("avenor_spawn", {
|
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
server.registerTool("avenor_status", {
|
|
77
|
-
description: "Get status of one or all runs",
|
|
77
|
+
description: "Get lifecycle status of one or all runs. Use lifecycle view for compact polling.",
|
|
78
78
|
inputSchema: {
|
|
79
79
|
run_id: z.string().optional().describe("Run ID or label to query"),
|
|
80
|
+
view: z.enum(["lifecycle", "full"]).optional().describe("Response detail (default full for compatibility)"),
|
|
80
81
|
supervisor_id: z.string().optional().describe("Supervisor ID for multi-supervisor mode")
|
|
81
82
|
}
|
|
82
|
-
}, async ({ run_id, supervisor_id }) => {
|
|
83
|
+
}, async ({ run_id, view, supervisor_id }) => {
|
|
83
84
|
return statusTool({
|
|
84
85
|
runId: run_id,
|
|
85
|
-
supervisorId: supervisor_id
|
|
86
|
+
supervisorId: supervisor_id,
|
|
87
|
+
view
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
server.registerTool("avenor_result", {
|
|
91
|
+
description: "Wait for a run to finish and return its bounded final output without event details",
|
|
92
|
+
inputSchema: {
|
|
93
|
+
run_id: z.string().describe("Run ID or label to await"),
|
|
94
|
+
wait: z.boolean().optional().describe("Wait for a terminal result (default true)"),
|
|
95
|
+
timeout: z.string().optional().describe("Maximum time to wait (e.g. 30s, 5m)"),
|
|
96
|
+
supervisor_id: z.string().optional().describe("Supervisor ID for multi-supervisor mode")
|
|
97
|
+
}
|
|
98
|
+
}, async ({ run_id, wait, timeout, supervisor_id }) => {
|
|
99
|
+
return resultTool({
|
|
100
|
+
runId: run_id,
|
|
101
|
+
supervisorId: supervisor_id,
|
|
102
|
+
wait,
|
|
103
|
+
timeout
|
|
86
104
|
});
|
|
87
105
|
});
|
|
88
106
|
server.registerTool("avenor_answer_permission", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dougbots/avenor-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dev": "tsdown --watch"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@dougbots/avenor-core": "^0.
|
|
33
|
+
"@dougbots/avenor-core": "^0.5.0",
|
|
34
34
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
35
35
|
"hono": "^4.12.19",
|
|
36
36
|
"zod": "^4.4.3"
|