@dougbots/avenor-mcp 0.9.0 → 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.
Files changed (3) hide show
  1. package/README.md +19 -1
  2. package/dist/index.js +13 -2
  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` | yes | Agent to invoke: `codex`, `claude`, `gemini`, `butler` |
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"),
@@ -24,6 +24,8 @@ const spawnInputShape = {
24
24
  "max"
25
25
  ]).optional().describe("Thinking level; omission uses the backend default and unsupported backends reject explicit values"),
26
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"),
27
29
  server_url: z.string().optional().describe("Backend server URL"),
28
30
  supervisor_id: z.string().optional().describe("Supervisor ID for multi-supervisor mode")
29
31
  };
@@ -71,7 +73,14 @@ const server = new McpServer({
71
73
  server.registerTool("avenor_spawn", {
72
74
  description: "Spawn a new agent run with an optional canonical thinking level; unsupported backends reject explicit values",
73
75
  inputSchema: spawnInputShape
74
- }, async ({ repo_dir, agent, prompt, prompt_file, label, timeout, model, thinking, 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
+ });
75
84
  return spawnTool({
76
85
  agent,
77
86
  dir: repo_dir,
@@ -82,6 +91,8 @@ server.registerTool("avenor_spawn", {
82
91
  model,
83
92
  thinking,
84
93
  backend,
94
+ rosterFile: roster_file,
95
+ rosterEntry: roster_entry,
85
96
  serverUrl: server_url,
86
97
  supervisorId: supervisor_id
87
98
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dougbots/avenor-mcp",
3
- "version": "0.9.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.9.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"