@dougbots/avenor-mcp 0.8.3 → 0.10.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 +19 -1
- package/dist/index.js +24 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -94,19 +94,37 @@ Start a new agent run.
|
|
|
94
94
|
|
|
95
95
|
| Parameter | Required | Description |
|
|
96
96
|
|---|---|---|
|
|
97
|
-
| `agent` |
|
|
97
|
+
| `agent` | no | Agent to invoke; omission uses the supplied model or runtime defaults |
|
|
98
98
|
| `repo_dir` | yes | Working directory for the agent |
|
|
99
99
|
| `prompt` | no | Prompt text (mutually exclusive with `prompt_file`) |
|
|
100
100
|
| `prompt_file` | no | Path to a prompt file |
|
|
101
101
|
| `label` | no | Human-readable label for this run |
|
|
102
102
|
| `timeout` | no | Duration string (`5m`, `1h`, `90s`) |
|
|
103
103
|
| `model` | no | Model override for the agent |
|
|
104
|
+
| `thinking` | no | Run-level reasoning control; unsupported effective backends reject explicit values |
|
|
104
105
|
| `backend` | no | Backend override (`opencode-http`, `opencode-acp`, `codex-app-server`, `agy`) |
|
|
106
|
+
| `roster_file` | no | Path to a top-level roster map |
|
|
107
|
+
| `roster_entry` | no | Key within `roster_file`; selects the complete backend/agent/model identity |
|
|
105
108
|
| `server_url` | no | Backend server URL, required by `opencode-http` unless configured by environment |
|
|
106
109
|
| `supervisor_id` | no | Supervisor ID for multi-supervisor setups |
|
|
107
110
|
|
|
108
111
|
Returns `{ run_id, label, supervisor_id }`. The `run_id` is what you pass to the other tools.
|
|
109
112
|
|
|
113
|
+
#### Direct and roster modes
|
|
114
|
+
|
|
115
|
+
Use both `roster_file` and `roster_entry` for roster mode. A roster entry requires `backend` plus at least one of `agent` or `model`, and cannot be mixed with direct `agent`, `model`, or `backend` fields. Direct mode permits all three identity fields to be omitted independently, including a backend-only request; omitted values use runtime defaults.
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"repo_dir": "/repo",
|
|
120
|
+
"prompt": "Analyze the repository",
|
|
121
|
+
"roster_file": "/repo/roster.json",
|
|
122
|
+
"roster_entry": "planner"
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The roster map is strict and currently supports only `backend`, `agent`, and `model` in each entry. `system` and `thinking` are not roster fields. The `thinking` argument remains run-level and is validated against the effective backend chosen by the direct request or roster entry. A resumed session cannot switch to a different backend.
|
|
127
|
+
|
|
110
128
|
### `avenor_status`
|
|
111
129
|
|
|
112
130
|
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.
|
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, resultTool, shutdownTool, spawnTool, statusTool } from "@dougbots/avenor-core";
|
|
7
|
+
import { answerPermissionTool, eventsTool, followUpTool, resultTool, shutdownTool, spawnTool, statusTool, validateSpawnSelection } from "@dougbots/avenor-core";
|
|
8
8
|
//#region src/spawn-schema.ts
|
|
9
9
|
const spawnInputShape = {
|
|
10
10
|
agent: z.string().optional().describe("Optional agent name; omission uses the supplied model or runtime defaults"),
|
|
@@ -14,7 +14,18 @@ const spawnInputShape = {
|
|
|
14
14
|
label: z.string().optional().describe("Human-readable label for this run"),
|
|
15
15
|
timeout: z.string().optional().describe("Timeout duration (e.g. 5m, 1h)"),
|
|
16
16
|
model: z.string().optional().describe("Model override"),
|
|
17
|
+
thinking: z.enum([
|
|
18
|
+
"off",
|
|
19
|
+
"minimal",
|
|
20
|
+
"low",
|
|
21
|
+
"medium",
|
|
22
|
+
"high",
|
|
23
|
+
"xhigh",
|
|
24
|
+
"max"
|
|
25
|
+
]).optional().describe("Thinking level; omission uses the backend default and unsupported backends reject explicit values"),
|
|
17
26
|
backend: z.string().optional().describe("Backend override"),
|
|
27
|
+
roster_file: z.string().optional().describe("Path to the roster map"),
|
|
28
|
+
roster_entry: z.string().optional().describe("Roster entry to select"),
|
|
18
29
|
server_url: z.string().optional().describe("Backend server URL"),
|
|
19
30
|
supervisor_id: z.string().optional().describe("Supervisor ID for multi-supervisor mode")
|
|
20
31
|
};
|
|
@@ -60,9 +71,16 @@ const server = new McpServer({
|
|
|
60
71
|
version: "0.1.0"
|
|
61
72
|
});
|
|
62
73
|
server.registerTool("avenor_spawn", {
|
|
63
|
-
description: "Spawn a new agent run",
|
|
74
|
+
description: "Spawn a new agent run with an optional canonical thinking level; unsupported backends reject explicit values",
|
|
64
75
|
inputSchema: spawnInputShape
|
|
65
|
-
}, async ({ repo_dir, agent, prompt, prompt_file, label, timeout, model, backend, server_url, supervisor_id }) => {
|
|
76
|
+
}, async ({ repo_dir, agent, prompt, prompt_file, label, timeout, model, thinking, backend, roster_file, roster_entry, server_url, supervisor_id }) => {
|
|
77
|
+
validateSpawnSelection({
|
|
78
|
+
agent,
|
|
79
|
+
model,
|
|
80
|
+
backend,
|
|
81
|
+
roster_file,
|
|
82
|
+
roster_entry
|
|
83
|
+
});
|
|
66
84
|
return spawnTool({
|
|
67
85
|
agent,
|
|
68
86
|
dir: repo_dir,
|
|
@@ -71,7 +89,10 @@ server.registerTool("avenor_spawn", {
|
|
|
71
89
|
label,
|
|
72
90
|
timeout,
|
|
73
91
|
model,
|
|
92
|
+
thinking,
|
|
74
93
|
backend,
|
|
94
|
+
rosterFile: roster_file,
|
|
95
|
+
rosterEntry: roster_entry,
|
|
75
96
|
serverUrl: server_url,
|
|
76
97
|
supervisorId: supervisor_id
|
|
77
98
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dougbots/avenor-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.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.10.0",
|
|
34
34
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
35
35
|
"hono": "^4.12.19",
|
|
36
36
|
"zod": "^4.4.3"
|