agent-orchestrator-mcp-server 0.4.4 → 0.4.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
CHANGED
|
@@ -77,7 +77,7 @@ export declare function startSessionTool(_server: Server, clientFactory: () => I
|
|
|
77
77
|
};
|
|
78
78
|
stop_condition: {
|
|
79
79
|
type: string;
|
|
80
|
-
description: "
|
|
80
|
+
description: "Stop condition ID from get_configs (e.g. \"pr_merged\"). The description is automatically resolved and passed to the agent as context.";
|
|
81
81
|
};
|
|
82
82
|
execution_provider: {
|
|
83
83
|
type: string;
|
|
@@ -18,7 +18,7 @@ const PARAM_DESCRIPTIONS = {
|
|
|
18
18
|
'(e.g. "Fix login redirect loop on mobile Safari", "Add dark mode toggle to settings page"). ' +
|
|
19
19
|
'Only omit if you truly have zero context about the session purpose, which should be extremely rare.',
|
|
20
20
|
slug: 'URL-friendly identifier for the session. Must be unique.',
|
|
21
|
-
stop_condition: '
|
|
21
|
+
stop_condition: 'Stop condition ID from get_configs (e.g. "pr_merged"). The description is automatically resolved and passed to the agent as context.',
|
|
22
22
|
execution_provider: 'Execution environment. Options: "local_filesystem" (runs locally), "remote_sandbox" (runs in isolated sandbox). Default: "local_filesystem"',
|
|
23
23
|
mcp_servers: 'List of MCP server names to enable for this session. Example: ["github-development", "slack"]',
|
|
24
24
|
config: 'Additional configuration as a JSON object.',
|
|
@@ -137,7 +137,21 @@ export function startSessionTool(_server, clientFactory) {
|
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
// Resolve stop_condition ID to its description so the agent receives
|
|
141
|
+
// meaningful context about when to stop, not just an opaque identifier.
|
|
142
|
+
let createArgs = validatedArgs;
|
|
143
|
+
if (validatedArgs.stop_condition) {
|
|
144
|
+
let configs = getConfigsCache();
|
|
145
|
+
if (!configs) {
|
|
146
|
+
configs = await client.getConfigs();
|
|
147
|
+
setConfigsCache(configs);
|
|
148
|
+
}
|
|
149
|
+
const match = configs.stop_conditions.find((sc) => sc.id === validatedArgs.stop_condition);
|
|
150
|
+
if (match) {
|
|
151
|
+
createArgs = { ...validatedArgs, stop_condition: match.description };
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
const session = await client.createSession(createArgs);
|
|
141
155
|
const lines = [
|
|
142
156
|
`## Session Started Successfully`,
|
|
143
157
|
'',
|