agent-orchestrator-mcp-server 0.4.3 → 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 +1 -1
- package/shared/orchestrator-client/orchestrator-client.d.ts +1 -0
- package/shared/orchestrator-client/orchestrator-client.integration-mock.js +1 -0
- package/shared/orchestrator-client/orchestrator-client.js +1 -0
- package/shared/tools/get-configs.js +4 -1
- package/shared/tools/start-session.d.ts +1 -1
- package/shared/tools/start-session.js +16 -2
- package/shared/types.d.ts +1 -0
package/package.json
CHANGED
|
@@ -415,6 +415,7 @@ export function createIntegrationMockOrchestratorClient(initialMockData) {
|
|
|
415
415
|
git_root: 'https://github.com/pulsemcp/mcp-servers.git',
|
|
416
416
|
default_branch: 'main',
|
|
417
417
|
default_mcp_servers: ['github-development'],
|
|
418
|
+
default_skills: ['discovery-classify', 'discovery-validate'],
|
|
418
419
|
},
|
|
419
420
|
],
|
|
420
421
|
stop_conditions: [
|
|
@@ -18,6 +18,7 @@ export function mapAgentRoot(raw) {
|
|
|
18
18
|
default_subdirectory: raw.subdirectory,
|
|
19
19
|
default_stop_condition: raw.default_stop_condition,
|
|
20
20
|
default_mcp_servers: raw.default_mcp_servers,
|
|
21
|
+
default_skills: raw.default_skills,
|
|
21
22
|
};
|
|
22
23
|
}
|
|
23
24
|
/** Default timeout for API requests in milliseconds */
|
|
@@ -11,7 +11,7 @@ const TOOL_DESCRIPTION = `Fetches all static configuration data in a single call
|
|
|
11
11
|
|
|
12
12
|
Returns:
|
|
13
13
|
- **MCP servers**: Available servers for use with start_session (name, title, description)
|
|
14
|
-
- **Agent roots**: Preconfigured repository settings with defaults (git_root, branch, mcp_servers, stop_condition)
|
|
14
|
+
- **Agent roots**: Preconfigured repository settings with defaults (git_root, branch, mcp_servers, skills, stop_condition)
|
|
15
15
|
- **Stop conditions**: Available session completion criteria (id, name, description)
|
|
16
16
|
|
|
17
17
|
**Use this tool** to get all configuration options before calling start_session.
|
|
@@ -156,6 +156,9 @@ function formatAgentRoot(lines, root) {
|
|
|
156
156
|
if (root.default_stop_condition) {
|
|
157
157
|
lines.push(`- **Default Stop Condition:** \`${root.default_stop_condition}\``);
|
|
158
158
|
}
|
|
159
|
+
if (root.default_skills && root.default_skills.length > 0) {
|
|
160
|
+
lines.push(`- **Default Skills:** ${root.default_skills.map((s) => `\`${s}\``).join(', ')}`);
|
|
161
|
+
}
|
|
159
162
|
lines.push('');
|
|
160
163
|
}
|
|
161
164
|
function formatStopCondition(lines, condition) {
|
|
@@ -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
|
'',
|
package/shared/types.d.ts
CHANGED