agent-orchestrator-mcp-server 0.8.3 → 0.8.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-orchestrator-mcp-server",
3
- "version": "0.8.3",
3
+ "version": "0.8.6",
4
4
  "description": "Local implementation of agent-orchestrator MCP server",
5
5
  "main": "build/index.js",
6
6
  "type": "module",
@@ -32,14 +32,14 @@ export declare function mapAgentRoot(raw: RawAgentRoot): AgentRootInfo;
32
32
  export interface IAgentOrchestratorClient {
33
33
  listSessions(options?: {
34
34
  status?: SessionStatus;
35
- agent_type?: string;
35
+ agent_runtime?: string;
36
36
  show_archived?: boolean;
37
37
  page?: number;
38
38
  per_page?: number;
39
39
  }): Promise<SessionsResponse>;
40
40
  searchSessions(query: string, options?: {
41
41
  status?: SessionStatus;
42
- agent_type?: string;
42
+ agent_runtime?: string;
43
43
  show_archived?: boolean;
44
44
  page?: number;
45
45
  per_page?: number;
@@ -159,14 +159,14 @@ export declare class AgentOrchestratorClient implements IAgentOrchestratorClient
159
159
  private requestText;
160
160
  listSessions(options?: {
161
161
  status?: SessionStatus;
162
- agent_type?: string;
162
+ agent_runtime?: string;
163
163
  show_archived?: boolean;
164
164
  page?: number;
165
165
  per_page?: number;
166
166
  }): Promise<SessionsResponse>;
167
167
  searchSessions(query: string, options?: {
168
168
  status?: SessionStatus;
169
- agent_type?: string;
169
+ agent_runtime?: string;
170
170
  show_archived?: boolean;
171
171
  page?: number;
172
172
  per_page?: number;
@@ -14,7 +14,7 @@ export function createIntegrationMockOrchestratorClient(initialMockData) {
14
14
  slug: 'test-session-1',
15
15
  title: 'Test Session 1',
16
16
  status: 'running',
17
- agent_type: 'claude_code',
17
+ agent_runtime: 'claude_code',
18
18
  prompt: 'Test prompt',
19
19
  git_root: 'https://github.com/example/repo.git',
20
20
  branch: 'main',
@@ -75,8 +75,8 @@ export function createIntegrationMockOrchestratorClient(initialMockData) {
75
75
  if (options?.status) {
76
76
  sessions = sessions.filter((s) => s.status === options.status);
77
77
  }
78
- if (options?.agent_type) {
79
- sessions = sessions.filter((s) => s.agent_type === options.agent_type);
78
+ if (options?.agent_runtime) {
79
+ sessions = sessions.filter((s) => s.agent_runtime === options.agent_runtime);
80
80
  }
81
81
  if (!options?.show_archived) {
82
82
  sessions = sessions.filter((s) => s.status !== 'archived');
@@ -138,7 +138,7 @@ export function createIntegrationMockOrchestratorClient(initialMockData) {
138
138
  slug: data.slug || null,
139
139
  title: data.title || 'New Session',
140
140
  status: 'waiting',
141
- agent_type: data.agent_type || 'claude_code',
141
+ agent_runtime: data.agent_runtime || 'claude_code',
142
142
  prompt: data.prompt || null,
143
143
  git_root: data.git_root || null,
144
144
  branch: data.branch || 'main',
@@ -54,7 +54,7 @@ function formatSessionDetails(session, includeTranscript) {
54
54
  '### Basic Information',
55
55
  `- **ID:** ${session.id}`,
56
56
  `- **Status:** ${session.status}`,
57
- `- **Agent Type:** ${session.agent_type}`,
57
+ `- **Agent Runtime:** ${session.agent_runtime}`,
58
58
  ];
59
59
  if (session.slug)
60
60
  lines.push(`- **Slug:** ${session.slug}`);
@@ -5,14 +5,14 @@ export declare const QuickSearchSessionsSchema: z.ZodObject<{
5
5
  id: z.ZodOptional<z.ZodNumber>;
6
6
  query: z.ZodOptional<z.ZodString>;
7
7
  status: z.ZodOptional<z.ZodEnum<["waiting", "running", "needs_input", "failed", "archived"]>>;
8
- agent_type: z.ZodOptional<z.ZodString>;
8
+ agent_runtime: z.ZodOptional<z.ZodString>;
9
9
  show_archived: z.ZodOptional<z.ZodBoolean>;
10
10
  page: z.ZodOptional<z.ZodNumber>;
11
11
  per_page: z.ZodOptional<z.ZodNumber>;
12
12
  }, "strip", z.ZodTypeAny, {
13
13
  per_page?: number | undefined;
14
14
  status?: "waiting" | "running" | "needs_input" | "failed" | "archived" | undefined;
15
- agent_type?: string | undefined;
15
+ agent_runtime?: string | undefined;
16
16
  show_archived?: boolean | undefined;
17
17
  page?: number | undefined;
18
18
  id?: number | undefined;
@@ -20,7 +20,7 @@ export declare const QuickSearchSessionsSchema: z.ZodObject<{
20
20
  }, {
21
21
  per_page?: number | undefined;
22
22
  status?: "waiting" | "running" | "needs_input" | "failed" | "archived" | undefined;
23
- agent_type?: string | undefined;
23
+ agent_runtime?: string | undefined;
24
24
  show_archived?: boolean | undefined;
25
25
  page?: number | undefined;
26
26
  id?: number | undefined;
@@ -46,9 +46,9 @@ export declare function quickSearchSessionsTool(_server: Server, clientFactory:
46
46
  enum: string[];
47
47
  description: "Filter results by status. Options: \"waiting\", \"running\", \"needs_input\", \"failed\", \"archived\"";
48
48
  };
49
- agent_type: {
49
+ agent_runtime: {
50
50
  type: string;
51
- description: "Filter results by agent type.";
51
+ description: "Filter results by agent runtime.";
52
52
  };
53
53
  show_archived: {
54
54
  type: string;
@@ -3,7 +3,7 @@ const PARAM_DESCRIPTIONS = {
3
3
  id: 'Get a specific session by ID. When provided, other filters are ignored.',
4
4
  query: 'Search query to find sessions. Matches against session title only — this is a simple title search, not a full-text or semantic search. Leave empty to list all sessions.',
5
5
  status: 'Filter results by status. Options: "waiting", "running", "needs_input", "failed", "archived"',
6
- agent_type: 'Filter results by agent type.',
6
+ agent_runtime: 'Filter results by agent runtime.',
7
7
  show_archived: 'Include archived sessions in results. Default: false',
8
8
  page: 'Page number for pagination. Default: 1',
9
9
  per_page: 'Number of results per page (1-100). Default: 25',
@@ -15,7 +15,7 @@ export const QuickSearchSessionsSchema = z.object({
15
15
  .enum(['waiting', 'running', 'needs_input', 'failed', 'archived'])
16
16
  .optional()
17
17
  .describe(PARAM_DESCRIPTIONS.status),
18
- agent_type: z.string().optional().describe(PARAM_DESCRIPTIONS.agent_type),
18
+ agent_runtime: z.string().optional().describe(PARAM_DESCRIPTIONS.agent_runtime),
19
19
  show_archived: z.boolean().optional().describe(PARAM_DESCRIPTIONS.show_archived),
20
20
  page: z.number().min(1).optional().describe(PARAM_DESCRIPTIONS.page),
21
21
  per_page: z.number().min(1).max(100).optional().describe(PARAM_DESCRIPTIONS.per_page),
@@ -45,7 +45,7 @@ function formatSession(session) {
45
45
  `### ${session.title} (ID: ${session.id})`,
46
46
  '',
47
47
  `- **Status:** ${session.status}`,
48
- `- **Agent Type:** ${session.agent_type}`,
48
+ `- **Agent Runtime:** ${session.agent_runtime}`,
49
49
  ];
50
50
  if (session.slug)
51
51
  lines.push(`- **Slug:** ${session.slug}`);
@@ -87,9 +87,9 @@ export function quickSearchSessionsTool(_server, clientFactory) {
87
87
  enum: ['waiting', 'running', 'needs_input', 'failed', 'archived'],
88
88
  description: PARAM_DESCRIPTIONS.status,
89
89
  },
90
- agent_type: {
90
+ agent_runtime: {
91
91
  type: 'string',
92
- description: PARAM_DESCRIPTIONS.agent_type,
92
+ description: PARAM_DESCRIPTIONS.agent_runtime,
93
93
  },
94
94
  show_archived: {
95
95
  type: 'boolean',
@@ -132,7 +132,7 @@ export function quickSearchSessionsTool(_server, clientFactory) {
132
132
  // Use search endpoint (title-only search, no content search)
133
133
  const response = await client.searchSessions(validatedArgs.query, {
134
134
  status: validatedArgs.status,
135
- agent_type: validatedArgs.agent_type,
135
+ agent_runtime: validatedArgs.agent_runtime,
136
136
  show_archived: validatedArgs.show_archived,
137
137
  page: validatedArgs.page,
138
138
  per_page: validatedArgs.per_page,
@@ -144,7 +144,7 @@ export function quickSearchSessionsTool(_server, clientFactory) {
144
144
  // Use list endpoint
145
145
  const response = await client.listSessions({
146
146
  status: validatedArgs.status,
147
- agent_type: validatedArgs.agent_type,
147
+ agent_runtime: validatedArgs.agent_runtime,
148
148
  show_archived: validatedArgs.show_archived,
149
149
  page: validatedArgs.page,
150
150
  per_page: validatedArgs.per_page,
@@ -2,7 +2,7 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
2
  import { z } from 'zod';
3
3
  import type { IAgentOrchestratorClient } from '../orchestrator-client/orchestrator-client.js';
4
4
  export declare const StartSessionSchema: z.ZodObject<{
5
- agent_type: z.ZodOptional<z.ZodString>;
5
+ agent_runtime: z.ZodOptional<z.ZodString>;
6
6
  prompt: z.ZodOptional<z.ZodString>;
7
7
  agent_root: z.ZodOptional<z.ZodString>;
8
8
  title: z.ZodOptional<z.ZodString>;
@@ -16,7 +16,7 @@ export declare const StartSessionSchema: z.ZodObject<{
16
16
  custom_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
17
17
  auto_compact_window: z.ZodOptional<z.ZodNumber>;
18
18
  }, "strip", z.ZodTypeAny, {
19
- agent_type?: string | undefined;
19
+ agent_runtime?: string | undefined;
20
20
  skills?: string[] | undefined;
21
21
  plugins?: string[] | undefined;
22
22
  prompt?: string | undefined;
@@ -30,7 +30,7 @@ export declare const StartSessionSchema: z.ZodObject<{
30
30
  custom_metadata?: Record<string, unknown> | undefined;
31
31
  auto_compact_window?: number | undefined;
32
32
  }, {
33
- agent_type?: string | undefined;
33
+ agent_runtime?: string | undefined;
34
34
  skills?: string[] | undefined;
35
35
  plugins?: string[] | undefined;
36
36
  prompt?: string | undefined;
@@ -50,9 +50,9 @@ export declare function startSessionTool(_server: Server, clientFactory: () => I
50
50
  inputSchema: {
51
51
  type: "object";
52
52
  properties: {
53
- agent_type: {
53
+ agent_runtime: {
54
54
  type: string;
55
- description: "Agent type for the session. Currently only \"claude_code\" is supported. Default: \"claude_code\"";
55
+ description: string;
56
56
  };
57
57
  prompt: {
58
58
  type: string;
@@ -102,7 +102,7 @@ export declare function startSessionTool(_server: Server, clientFactory: () => I
102
102
  };
103
103
  config: {
104
104
  type: string;
105
- description: "Additional configuration as a JSON object.";
105
+ description: string;
106
106
  };
107
107
  custom_metadata: {
108
108
  type: string;
@@ -2,7 +2,10 @@ import { z } from 'zod';
2
2
  import { parseAllowedAgentRoots, validateAgentRootConstraints } from '../allowed-agent-roots.js';
3
3
  import { getConfigsCache, setConfigsCache } from '../cache/configs-cache.js';
4
4
  const PARAM_DESCRIPTIONS = {
5
- agent_type: 'Agent type for the session. Currently only "claude_code" is supported. Default: "claude_code"',
5
+ agent_runtime: 'Per-spawn agent runtime override. Valid values are "claude_code" (Claude Code) and "codex" (OpenAI Codex CLI). ' +
6
+ 'When omitted, the session adopts the agent_root\'s default_runtime, falling back to "claude_code". ' +
7
+ "Call get_configs to see each agent root's default_runtime. Pair with `config.model` to pick a model valid for the chosen runtime " +
8
+ '(e.g. "opus"/"sonnet"/"haiku" for claude_code, "gpt-5.5"/"gpt-5.4" for codex).',
6
9
  prompt: 'Initial prompt for the agent. If provided, the agent job is automatically queued. Omit for a clone-only session.',
7
10
  agent_root: 'Agent root name from get_configs. The API resolves git_root, branch, subdirectory, default_model, and other defaults from the agent root configuration. Always pass this so the session inherits the correct repository, model, and settings.',
8
11
  title: 'STRONGLY RECOMMENDED: Always set a title — treat it as effectively required. ' +
@@ -16,7 +19,11 @@ const PARAM_DESCRIPTIONS = {
16
19
  mcp_servers: 'List of MCP server names to enable for this session. Example: ["github-development", "slack"]',
17
20
  skills: 'List of skill names to enable for this session. Always include the agent root\'s default_skills from get_configs as the starting point — omitting skills means the session gets none. Add extras as needed; removing a default should be rare and intentional. Example: ["discovery-classify", "publish-and-pr"]',
18
21
  plugins: 'List of plugin names to enable for this session. Plugins extend agent capabilities with additional integrations. Example: ["my-plugin"]',
19
- config: 'Additional configuration as a JSON object.',
22
+ config: 'Additional configuration as a JSON object. Use `config.model` to choose the agent model for this session ' +
23
+ '(e.g. {"model": "gpt-5.4"} for a codex runtime, or {"model": "sonnet"} for claude_code). ' +
24
+ "The model must be valid for the resolved agent_runtime; call get_configs to see each agent root's default_model. " +
25
+ "When omitted, the session uses the agent root's default_model (or the runtime's default model). " +
26
+ "An explicit config.model always takes precedence over the agent root's default_model.",
20
27
  custom_metadata: 'User-defined metadata as a JSON object. Useful for tracking tickets, projects, etc.',
21
28
  auto_compact_window: 'Optional per-session auto-compact (context) window override, in tokens. ' +
22
29
  '**You should generally rely on the default of 200,000** — omit this parameter and the API default applies. ' +
@@ -25,7 +32,7 @@ const PARAM_DESCRIPTIONS = {
25
32
  'Compaction thrashing is currently the only known reason to set this preemptively.',
26
33
  };
27
34
  export const StartSessionSchema = z.object({
28
- agent_type: z.string().optional().describe(PARAM_DESCRIPTIONS.agent_type),
35
+ agent_runtime: z.string().optional().describe(PARAM_DESCRIPTIONS.agent_runtime),
29
36
  prompt: z.string().optional().describe(PARAM_DESCRIPTIONS.prompt),
30
37
  agent_root: z.string().optional().describe(PARAM_DESCRIPTIONS.agent_root),
31
38
  title: z.string().optional().describe(PARAM_DESCRIPTIONS.title),
@@ -59,6 +66,8 @@ const TOOL_DESCRIPTION = `Start a new agent session in the Agent Orchestrator.
59
66
  - **MCP servers:** Start with \`default_mcp_servers\`. Drop servers the task doesn't need (least-privilege). Add extras when the task requires tools beyond the defaults. When \`ALLOWED_AGENT_ROOTS\` is active, you cannot add servers beyond the defaults.
60
67
  - **Skills:** Start with \`default_skills\`. You can freely add skills beyond the defaults. Removing a default skill should be rare and intentional — only when you have a specific reason, like replacing a skill with a more capable variant that covers the same ground. Skills are lightweight text files with no blast radius, so keeping all defaults costs nothing.
61
68
 
69
+ **Runtime and model selection:** Pass \`agent_runtime\` to override which agent runtime the session uses — \`claude_code\` (Claude Code) or \`codex\` (OpenAI Codex CLI). Pass \`config: { model: "..." }\` to choose the model (e.g. \`opus\`/\`sonnet\`/\`haiku\` for claude_code, \`gpt-5.5\`/\`gpt-5.4\` for codex). Both are optional: when omitted, the session inherits the agent root's \`default_runtime\` and \`default_model\`. Call get_configs to discover each root's defaults and pick a model that is valid for the chosen runtime.
70
+
62
71
  **Use cases:**
63
72
  - Start a new agent task on a repository
64
73
  - Create a session to work on a specific branch
@@ -71,9 +80,9 @@ export function startSessionTool(_server, clientFactory) {
71
80
  inputSchema: {
72
81
  type: 'object',
73
82
  properties: {
74
- agent_type: {
83
+ agent_runtime: {
75
84
  type: 'string',
76
- description: PARAM_DESCRIPTIONS.agent_type,
85
+ description: PARAM_DESCRIPTIONS.agent_runtime,
77
86
  },
78
87
  prompt: {
79
88
  type: 'string',
@@ -214,12 +214,12 @@ export function wakeMeUpLaterTool(_server, clientFactory) {
214
214
  // The Rails Trigger model requires agent_root_name, but for per-session
215
215
  // wake-up triggers (reuse_session + last_session_id + one-time schedule)
216
216
  // the value is never used to spawn a session — the target session is
217
- // always reused. Prefer the canonical metadata value. The agent_type
217
+ // always reused. Prefer the canonical metadata value. The agent_runtime
218
218
  // fallback is a best-effort for pre-migration sessions without an
219
- // agent_root_key; if agent_type isn't a registered agent root, the
219
+ // agent_root_key; if agent_runtime isn't a registered agent root, the
220
220
  // createTrigger call will fail loudly with a 422 rather than proceed
221
221
  // with a bad value — which is what we want.
222
- const agentRootName = session.metadata?.agent_root_key || session.agent_type;
222
+ const agentRootName = session.metadata?.agent_root_key || session.agent_runtime;
223
223
  let trigger;
224
224
  try {
225
225
  trigger = await client.createTrigger({
@@ -229,9 +229,9 @@ export function wakeMeUpWhenSessionChangesStateTool(_server, clientFactory) {
229
229
  // The Rails Trigger model requires agent_root_name, but for per-session
230
230
  // wake-up triggers (reuse_session + last_session_id + one-time event)
231
231
  // the value is never used to spawn a session — the target session is
232
- // always reused. Prefer the canonical metadata value with agent_type as
232
+ // always reused. Prefer the canonical metadata value with agent_runtime as
233
233
  // a legacy fallback (matches wake_me_up_later behavior).
234
- const agentRootName = session.metadata?.agent_root_key || session.agent_type;
234
+ const agentRootName = session.metadata?.agent_root_key || session.agent_runtime;
235
235
  let trigger;
236
236
  try {
237
237
  trigger = await client.createTrigger({
package/shared/types.d.ts CHANGED
@@ -15,7 +15,7 @@ export interface Session {
15
15
  slug: string | null;
16
16
  title: string;
17
17
  status: SessionStatus;
18
- agent_type: string;
18
+ agent_runtime: string;
19
19
  prompt: string | null;
20
20
  git_root: string | null;
21
21
  branch: string | null;
@@ -135,7 +135,7 @@ export interface SendPushNotificationResponse {
135
135
  session_id: number;
136
136
  }
137
137
  export interface CreateSessionRequest {
138
- agent_type?: string;
138
+ agent_runtime?: string;
139
139
  prompt?: string;
140
140
  git_root?: string;
141
141
  branch?: string;