rrce-workflow 0.2.26 → 0.2.27

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 (2) hide show
  1. package/dist/index.js +67 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1149,6 +1149,23 @@ function registerToolHandlers(server) {
1149
1149
  properties: { project: { type: "string", description: "Name of the project to get context for" } },
1150
1150
  required: ["project"]
1151
1151
  }
1152
+ },
1153
+ {
1154
+ name: "list_agents",
1155
+ description: "List available RRCE agents/workflows",
1156
+ inputSchema: { type: "object", properties: {} }
1157
+ },
1158
+ {
1159
+ name: "get_agent_prompt",
1160
+ description: "Get the instructions/prompt for a specific agent",
1161
+ inputSchema: {
1162
+ type: "object",
1163
+ properties: {
1164
+ agent: { type: "string", description: "Name of the agent (e.g. init, plan, execute)" },
1165
+ args: { type: "object", description: "Arguments for the agent prompt", additionalProperties: true }
1166
+ },
1167
+ required: ["agent"]
1168
+ }
1152
1169
  }
1153
1170
  ]
1154
1171
  }));
@@ -1179,6 +1196,56 @@ function registerToolHandlers(server) {
1179
1196
  }
1180
1197
  return { content: [{ type: "text", text: context }] };
1181
1198
  }
1199
+ case "list_agents": {
1200
+ const prompts = getAllPrompts();
1201
+ return {
1202
+ content: [{
1203
+ type: "text",
1204
+ text: JSON.stringify(prompts.map((p) => ({
1205
+ name: p.name,
1206
+ description: p.description,
1207
+ arguments: p.arguments
1208
+ })), null, 2)
1209
+ }]
1210
+ };
1211
+ }
1212
+ case "get_agent_prompt": {
1213
+ const params = args;
1214
+ const agentName = params.agent;
1215
+ const promptDef = getPromptDef(agentName);
1216
+ if (!promptDef) {
1217
+ throw new Error(`Agent not found: ${agentName}`);
1218
+ }
1219
+ const renderArgs = params.args || {};
1220
+ const stringArgs = {};
1221
+ for (const [key, val] of Object.entries(renderArgs)) {
1222
+ stringArgs[key] = String(val);
1223
+ }
1224
+ const content = renderPrompt(promptDef.content, stringArgs);
1225
+ const projects = getExposedProjects();
1226
+ const activeProject = detectActiveProject();
1227
+ const projectList = projects.map((p) => {
1228
+ const isActive = activeProject && p.dataPath === activeProject.dataPath;
1229
+ return `- ${p.name} (${p.source}) ${isActive ? "**[ACTIVE]**" : ""}`;
1230
+ }).join("\n");
1231
+ let contextPreamble = `
1232
+ Context - Available Projects (MCP Hub):
1233
+ ${projectList}
1234
+ `;
1235
+ if (activeProject) {
1236
+ contextPreamble += `
1237
+ Current Active Workspace: ${activeProject.name} (${activeProject.path})
1238
+ `;
1239
+ contextPreamble += `IMPORTANT: Treat '${activeProject.path}' as the {{WORKSPACE_ROOT}}. All relative path operations (file reads/writes) MUST be performed relative to this directory.
1240
+ `;
1241
+ }
1242
+ contextPreamble += `
1243
+ Note: If the user's request refers to a project not listed here, ask them to expose it via 'rrce-workflow mcp configure'.
1244
+
1245
+ ---
1246
+ `;
1247
+ return { content: [{ type: "text", text: contextPreamble + content }] };
1248
+ }
1182
1249
  default:
1183
1250
  throw new Error(`Unknown tool: ${name}`);
1184
1251
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrce-workflow",
3
- "version": "0.2.26",
3
+ "version": "0.2.27",
4
4
  "description": "RRCE-Workflow TUI - Agentic code workflow generator for AI-assisted development",
5
5
  "author": "RRCE Team",
6
6
  "license": "MIT",