agent-orchestrator-mcp-server 0.8.3 → 0.8.5
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 +1 -1
- package/shared/orchestrator-client/orchestrator-client.d.ts +4 -4
- package/shared/orchestrator-client/orchestrator-client.integration-mock.js +4 -4
- package/shared/tools/get-session.js +1 -1
- package/shared/tools/search-sessions.d.ts +5 -5
- package/shared/tools/search-sessions.js +7 -7
- package/shared/tools/start-session.d.ts +5 -5
- package/shared/tools/start-session.js +4 -4
- package/shared/tools/wake-me-up-later.js +3 -3
- package/shared/tools/wake-me-up-when-session-changes-state.js +2 -2
- package/shared/types.d.ts +2 -2
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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?.
|
|
79
|
-
sessions = sessions.filter((s) => s.
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
49
|
+
agent_runtime: {
|
|
50
50
|
type: string;
|
|
51
|
-
description: "Filter results by agent
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
90
|
+
agent_runtime: {
|
|
91
91
|
type: 'string',
|
|
92
|
-
description: PARAM_DESCRIPTIONS.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
53
|
+
agent_runtime: {
|
|
54
54
|
type: string;
|
|
55
|
-
description: "
|
|
55
|
+
description: "Per-spawn agent runtime override. When omitted, the session adopts the agent_root's default_runtime, falling back to \"claude_code\". Currently only \"claude_code\" is registered.";
|
|
56
56
|
};
|
|
57
57
|
prompt: {
|
|
58
58
|
type: string;
|
|
@@ -2,7 +2,7 @@ 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
|
-
|
|
5
|
+
agent_runtime: 'Per-spawn agent runtime override. When omitted, the session adopts the agent_root\'s default_runtime, falling back to "claude_code". Currently only "claude_code" is registered.',
|
|
6
6
|
prompt: 'Initial prompt for the agent. If provided, the agent job is automatically queued. Omit for a clone-only session.',
|
|
7
7
|
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
8
|
title: 'STRONGLY RECOMMENDED: Always set a title — treat it as effectively required. ' +
|
|
@@ -25,7 +25,7 @@ const PARAM_DESCRIPTIONS = {
|
|
|
25
25
|
'Compaction thrashing is currently the only known reason to set this preemptively.',
|
|
26
26
|
};
|
|
27
27
|
export const StartSessionSchema = z.object({
|
|
28
|
-
|
|
28
|
+
agent_runtime: z.string().optional().describe(PARAM_DESCRIPTIONS.agent_runtime),
|
|
29
29
|
prompt: z.string().optional().describe(PARAM_DESCRIPTIONS.prompt),
|
|
30
30
|
agent_root: z.string().optional().describe(PARAM_DESCRIPTIONS.agent_root),
|
|
31
31
|
title: z.string().optional().describe(PARAM_DESCRIPTIONS.title),
|
|
@@ -71,9 +71,9 @@ export function startSessionTool(_server, clientFactory) {
|
|
|
71
71
|
inputSchema: {
|
|
72
72
|
type: 'object',
|
|
73
73
|
properties: {
|
|
74
|
-
|
|
74
|
+
agent_runtime: {
|
|
75
75
|
type: 'string',
|
|
76
|
-
description: PARAM_DESCRIPTIONS.
|
|
76
|
+
description: PARAM_DESCRIPTIONS.agent_runtime,
|
|
77
77
|
},
|
|
78
78
|
prompt: {
|
|
79
79
|
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
|
|
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
|
|
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.
|
|
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
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
138
|
+
agent_runtime?: string;
|
|
139
139
|
prompt?: string;
|
|
140
140
|
git_root?: string;
|
|
141
141
|
branch?: string;
|