rrce-workflow 0.2.85 → 0.2.86

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 +62 -34
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -100,17 +100,45 @@ function getConfigPath(workspaceRoot) {
100
100
  if (fs2.existsSync(mcpConfigPath)) {
101
101
  const mcpContent = fs2.readFileSync(mcpConfigPath, "utf-8");
102
102
  const lines = mcpContent.split("\n");
103
+ let inProjects = false;
103
104
  let currentName = "";
105
+ let currentPath = "";
104
106
  for (let i = 0; i < lines.length; i++) {
105
- const line = lines[i]?.trim();
106
- if (!line) continue;
107
- if (line.startsWith("- name:")) {
108
- currentName = line.replace("- name:", "").trim();
109
- } else if (line.startsWith("path:")) {
110
- const p = line.replace("path:", "").trim();
111
- if (p === workspaceRoot || p === `"${workspaceRoot}"` || p === `'${workspaceRoot}'`) {
112
- return path2.join(rrceHome, "workspaces", currentName, "config.yaml");
107
+ const line = lines[i];
108
+ const trimmed = line.trim();
109
+ if (trimmed.startsWith("projects:")) {
110
+ inProjects = true;
111
+ continue;
112
+ }
113
+ if (inProjects && line.match(/^[a-zA-Z0-9_-]+:/)) {
114
+ inProjects = false;
115
+ }
116
+ if (!inProjects) continue;
117
+ if (trimmed.startsWith("-")) {
118
+ if (currentName && currentPath) {
119
+ if (currentPath === workspaceRoot || currentPath === `"${workspaceRoot}"` || currentPath === `'${workspaceRoot}'`) {
120
+ return path2.join(rrceHome, "workspaces", currentName, "config.yaml");
121
+ }
122
+ }
123
+ currentName = "";
124
+ currentPath = "";
125
+ const contentAfterDash = trimmed.substring(1).trim();
126
+ if (contentAfterDash.startsWith("name:")) {
127
+ currentName = contentAfterDash.replace("name:", "").trim();
128
+ } else if (contentAfterDash.startsWith("path:")) {
129
+ currentPath = contentAfterDash.replace("path:", "").trim();
113
130
  }
131
+ } else {
132
+ if (trimmed.startsWith("name:")) {
133
+ currentName = trimmed.replace("name:", "").trim();
134
+ } else if (trimmed.startsWith("path:")) {
135
+ currentPath = trimmed.replace("path:", "").trim();
136
+ }
137
+ }
138
+ }
139
+ if (currentName && currentPath) {
140
+ if (currentPath === workspaceRoot || currentPath === `"${workspaceRoot}"` || currentPath === `'${workspaceRoot}'`) {
141
+ return path2.join(rrceHome, "workspaces", currentName, "config.yaml");
114
142
  }
115
143
  }
116
144
  }
@@ -2844,7 +2872,7 @@ function registerToolHandlers(server) {
2844
2872
  server.setRequestHandler(ListToolsRequestSchema, async () => {
2845
2873
  const tools = [
2846
2874
  {
2847
- name: "rrce_search_knowledge",
2875
+ name: "search_knowledge",
2848
2876
  description: "Search across all exposed project knowledge bases",
2849
2877
  inputSchema: {
2850
2878
  type: "object",
@@ -2856,7 +2884,7 @@ function registerToolHandlers(server) {
2856
2884
  }
2857
2885
  },
2858
2886
  {
2859
- name: "rrce_index_knowledge",
2887
+ name: "index_knowledge",
2860
2888
  description: "Update the semantic search index for a specific project",
2861
2889
  inputSchema: {
2862
2890
  type: "object",
@@ -2868,12 +2896,12 @@ function registerToolHandlers(server) {
2868
2896
  }
2869
2897
  },
2870
2898
  {
2871
- name: "rrce_list_projects",
2899
+ name: "list_projects",
2872
2900
  description: "List all projects exposed via MCP. Use these names for project-specific tools.",
2873
2901
  inputSchema: { type: "object", properties: {} }
2874
2902
  },
2875
2903
  {
2876
- name: "rrce_get_project_context",
2904
+ name: "get_project_context",
2877
2905
  description: "Get the project context/architecture for a specific project",
2878
2906
  inputSchema: {
2879
2907
  type: "object",
@@ -2882,12 +2910,12 @@ function registerToolHandlers(server) {
2882
2910
  }
2883
2911
  },
2884
2912
  {
2885
- name: "rrce_list_agents",
2913
+ name: "list_agents",
2886
2914
  description: "List available agents (e.g. init, plan) and their arguments. Use this to discover which agent to call.",
2887
2915
  inputSchema: { type: "object", properties: {} }
2888
2916
  },
2889
2917
  {
2890
- name: "rrce_get_agent_prompt",
2918
+ name: "get_agent_prompt",
2891
2919
  description: 'Get the system prompt for a specific agent. Accepts agent Name (e.g. "RRCE Init") or ID (e.g. "init").',
2892
2920
  inputSchema: {
2893
2921
  type: "object",
@@ -2899,7 +2927,7 @@ function registerToolHandlers(server) {
2899
2927
  }
2900
2928
  },
2901
2929
  {
2902
- name: "rrce_list_tasks",
2930
+ name: "list_tasks",
2903
2931
  description: "List all tasks for a project",
2904
2932
  inputSchema: {
2905
2933
  type: "object",
@@ -2908,7 +2936,7 @@ function registerToolHandlers(server) {
2908
2936
  }
2909
2937
  },
2910
2938
  {
2911
- name: "rrce_get_task",
2939
+ name: "get_task",
2912
2940
  description: "Get details of a specific task",
2913
2941
  inputSchema: {
2914
2942
  type: "object",
@@ -2920,7 +2948,7 @@ function registerToolHandlers(server) {
2920
2948
  }
2921
2949
  },
2922
2950
  {
2923
- name: "rrce_create_task",
2951
+ name: "create_task",
2924
2952
  description: "Create a new task in the project",
2925
2953
  inputSchema: {
2926
2954
  type: "object",
@@ -2934,7 +2962,7 @@ function registerToolHandlers(server) {
2934
2962
  }
2935
2963
  },
2936
2964
  {
2937
- name: "rrce_update_task",
2965
+ name: "update_task",
2938
2966
  description: "Update an existing task",
2939
2967
  inputSchema: {
2940
2968
  type: "object",
@@ -2947,7 +2975,7 @@ function registerToolHandlers(server) {
2947
2975
  }
2948
2976
  },
2949
2977
  {
2950
- name: "rrce_delete_task",
2978
+ name: "delete_task",
2951
2979
  description: "Delete a task from the project",
2952
2980
  inputSchema: {
2953
2981
  type: "object",
@@ -2962,7 +2990,7 @@ function registerToolHandlers(server) {
2962
2990
  const projects = getExposedProjects();
2963
2991
  if (projects.length === 0) {
2964
2992
  tools.push({
2965
- name: "rrce_help_setup",
2993
+ name: "help_setup",
2966
2994
  description: "Get help on how to configure projects for the RRCE MCP Server",
2967
2995
  inputSchema: { type: "object", properties: {} }
2968
2996
  });
@@ -2974,27 +3002,27 @@ function registerToolHandlers(server) {
2974
3002
  logger.info(`Calling tool: ${name}`, args);
2975
3003
  try {
2976
3004
  switch (name) {
2977
- case "rrce_search_knowledge": {
3005
+ case "search_knowledge": {
2978
3006
  const params = args;
2979
3007
  const results = await searchKnowledge(params.query, params.project);
2980
3008
  return { content: [{ type: "text", text: JSON.stringify(results, null, 2) }] };
2981
3009
  }
2982
- case "rrce_index_knowledge": {
3010
+ case "index_knowledge": {
2983
3011
  const params = args;
2984
3012
  const result = await indexKnowledge(params.project, params.force);
2985
3013
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
2986
3014
  }
2987
- case "rrce_list_projects": {
3015
+ case "list_projects": {
2988
3016
  const projects = getExposedProjects();
2989
3017
  const list = projects.map((p) => ({ name: p.name, source: p.source, path: p.path }));
2990
3018
  return {
2991
3019
  content: [{
2992
3020
  type: "text",
2993
- text: JSON.stringify(list, null, 2) + "\n\nTip: Use these project names for tools like `rrce_get_project_context` or `rrce_index_knowledge`."
3021
+ text: JSON.stringify(list, null, 2) + "\n\nTip: Use these project names for tools like `get_project_context` or `index_knowledge`."
2994
3022
  }]
2995
3023
  };
2996
3024
  }
2997
- case "rrce_get_project_context": {
3025
+ case "get_project_context": {
2998
3026
  const context = getProjectContext(args.project);
2999
3027
  if (!context) {
3000
3028
  const projects = getExposedProjects().map((p) => p.name).join(", ");
@@ -3005,7 +3033,7 @@ Available projects: ${projects}`;
3005
3033
  }
3006
3034
  return { content: [{ type: "text", text: context }] };
3007
3035
  }
3008
- case "rrce_list_agents": {
3036
+ case "list_agents": {
3009
3037
  const prompts = getAllPrompts();
3010
3038
  return {
3011
3039
  content: [{
@@ -3015,11 +3043,11 @@ Available projects: ${projects}`;
3015
3043
  id: p.id,
3016
3044
  description: p.description,
3017
3045
  arguments: p.arguments
3018
- })), null, 2) + "\n\nTip: Retrieve the prompt for an agent using `rrce_get_agent_prompt` with its name or ID."
3046
+ })), null, 2) + "\n\nTip: Retrieve the prompt for an agent using `get_agent_prompt` with its name or ID."
3019
3047
  }]
3020
3048
  };
3021
3049
  }
3022
- case "rrce_get_agent_prompt": {
3050
+ case "get_agent_prompt": {
3023
3051
  const params = args;
3024
3052
  const agentName = params.agent;
3025
3053
  const promptDef = getPromptDef(agentName);
@@ -3044,12 +3072,12 @@ The system has pre-resolved the configuration for this project. Use these values
3044
3072
  `;
3045
3073
  return { content: [{ type: "text", text: contextPreamble + rendered }] };
3046
3074
  }
3047
- case "rrce_list_tasks": {
3075
+ case "list_tasks": {
3048
3076
  const params = args;
3049
3077
  const tasks = getProjectTasks(params.project);
3050
3078
  return { content: [{ type: "text", text: JSON.stringify(tasks, null, 2) }] };
3051
3079
  }
3052
- case "rrce_get_task": {
3080
+ case "get_task": {
3053
3081
  const params = args;
3054
3082
  const task = getTask(params.project, params.task_slug);
3055
3083
  if (!task) {
@@ -3057,7 +3085,7 @@ The system has pre-resolved the configuration for this project. Use these values
3057
3085
  }
3058
3086
  return { content: [{ type: "text", text: JSON.stringify(task, null, 2) }] };
3059
3087
  }
3060
- case "rrce_create_task": {
3088
+ case "create_task": {
3061
3089
  const params = args;
3062
3090
  const taskData = {
3063
3091
  title: params.title || params.task_slug,
@@ -3067,18 +3095,18 @@ The system has pre-resolved the configuration for this project. Use these values
3067
3095
  return { content: [{ type: "text", text: `\u2713 Task '${params.task_slug}' created. meta.json saved.
3068
3096
  ${JSON.stringify(task, null, 2)}` }] };
3069
3097
  }
3070
- case "rrce_update_task": {
3098
+ case "update_task": {
3071
3099
  const params = args;
3072
3100
  const task = await updateTask(params.project, params.task_slug, params.updates);
3073
3101
  return { content: [{ type: "text", text: `\u2713 Task '${params.task_slug}' updated. meta.json saved.
3074
3102
  ${JSON.stringify(task, null, 2)}` }] };
3075
3103
  }
3076
- case "rrce_delete_task": {
3104
+ case "delete_task": {
3077
3105
  const params = args;
3078
3106
  const success = deleteTask(params.project, params.task_slug);
3079
3107
  return { content: [{ type: "text", text: success ? `\u2713 Task '${params.task_slug}' deleted.` : `\u2717 Failed to delete '${params.task_slug}'.` }] };
3080
3108
  }
3081
- case "rrce_help_setup": {
3109
+ case "help_setup": {
3082
3110
  const msg = `
3083
3111
  RRCE MCP Server is running, but no projects are configured/exposed.
3084
3112
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrce-workflow",
3
- "version": "0.2.85",
3
+ "version": "0.2.86",
4
4
  "description": "RRCE-Workflow TUI - Agentic code workflow generator for AI-assisted development",
5
5
  "author": "RRCE Team",
6
6
  "license": "MIT",