rrce-workflow 0.2.55 → 0.2.57

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 +63 -40
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1152,6 +1152,7 @@ function installAgentPrompts(config, workspacePath, dataPaths) {
1152
1152
  const agentCoreDir = getAgentCoreDir();
1153
1153
  syncMetadataToAll(agentCoreDir, dataPaths);
1154
1154
  copyDirToAllStoragePaths(path10.join(agentCoreDir, "templates"), "templates", dataPaths);
1155
+ copyDirToAllStoragePaths(path10.join(agentCoreDir, "prompts"), "prompts", dataPaths);
1155
1156
  if (config.storageMode === "workspace") {
1156
1157
  const prompts = loadPromptsFromDir(getAgentCorePromptsDir());
1157
1158
  if (config.tools.includes("copilot")) {
@@ -1184,8 +1185,8 @@ project:
1184
1185
  name: "${workspaceName}"
1185
1186
 
1186
1187
  tools:
1187
- copilot: ${config.tools.includes("copilot")}
1188
- antigravity: ${config.tools.includes("antigravity")}
1188
+ copilot: ${config.storageMode === "workspace" && config.tools.includes("copilot")}
1189
+ antigravity: ${config.storageMode === "workspace" && config.tools.includes("antigravity")}
1189
1190
  `;
1190
1191
  if (config.linkedProjects.length > 0) {
1191
1192
  content += `
@@ -2091,7 +2092,7 @@ function registerToolHandlers(server) {
2091
2092
  },
2092
2093
  {
2093
2094
  name: "list_projects",
2094
- description: "List all projects exposed via MCP",
2095
+ description: "List all projects exposed via MCP. Use these names for project-specific tools.",
2095
2096
  inputSchema: { type: "object", properties: {} }
2096
2097
  },
2097
2098
  {
@@ -2105,12 +2106,12 @@ function registerToolHandlers(server) {
2105
2106
  },
2106
2107
  {
2107
2108
  name: "list_agents",
2108
- description: "List available RRCE agents/workflows",
2109
+ description: "List available agents (e.g. init, plan) and their arguments. Use this to discover which agent to call.",
2109
2110
  inputSchema: { type: "object", properties: {} }
2110
2111
  },
2111
2112
  {
2112
2113
  name: "get_agent_prompt",
2113
- description: "Get the instructions/prompt for a specific agent",
2114
+ description: 'Get the system prompt for a specific agent. Accepts agent Name (e.g. "RRCE Init") or ID (e.g. "init").',
2114
2115
  inputSchema: {
2115
2116
  type: "object",
2116
2117
  properties: {
@@ -2147,17 +2148,20 @@ function registerToolHandlers(server) {
2147
2148
  }
2148
2149
  case "list_projects": {
2149
2150
  const projects = getExposedProjects();
2151
+ const list = projects.map((p) => ({ name: p.name, source: p.source, path: p.path }));
2150
2152
  return {
2151
2153
  content: [{
2152
2154
  type: "text",
2153
- text: JSON.stringify(projects.map((p) => ({ name: p.name, source: p.source, path: p.path })), null, 2)
2155
+ text: JSON.stringify(list, null, 2) + "\n\nTip: Use these project names for tools like `get_project_context` or `index_knowledge`."
2154
2156
  }]
2155
2157
  };
2156
2158
  }
2157
2159
  case "get_project_context": {
2158
2160
  const context = getProjectContext(args.project);
2159
2161
  if (!context) {
2160
- const msg = `No project context found for "${args.project}"`;
2162
+ const projects = getExposedProjects().map((p) => p.name).join(", ");
2163
+ const msg = `No project context found for "${args.project}".
2164
+ Available projects: ${projects}`;
2161
2165
  logger.warn(msg);
2162
2166
  return { content: [{ type: "text", text: msg }], isError: true };
2163
2167
  }
@@ -2170,9 +2174,10 @@ function registerToolHandlers(server) {
2170
2174
  type: "text",
2171
2175
  text: JSON.stringify(prompts.map((p) => ({
2172
2176
  name: p.name,
2177
+ id: p.id,
2173
2178
  description: p.description,
2174
2179
  arguments: p.arguments
2175
- })), null, 2)
2180
+ })), null, 2) + "\n\nTip: Retrieve the prompt for an agent using `get_agent_prompt` with its name or ID."
2176
2181
  }]
2177
2182
  };
2178
2183
  }
@@ -2181,7 +2186,8 @@ function registerToolHandlers(server) {
2181
2186
  const agentName = params.agent;
2182
2187
  const promptDef = getPromptDef(agentName);
2183
2188
  if (!promptDef) {
2184
- throw new Error(`Agent not found: ${agentName}`);
2189
+ const available = getAllPrompts().map((p) => `${p.name} (id: ${p.id})`).join(", ");
2190
+ throw new Error(`Agent not found: ${agentName}. Available agents: ${available}`);
2185
2191
  }
2186
2192
  const renderArgs = params.args || {};
2187
2193
  const stringArgs = {};
@@ -2751,7 +2757,7 @@ var init_Header = __esm({
2751
2757
  });
2752
2758
 
2753
2759
  // src/mcp/ui/Overview.tsx
2754
- import "react";
2760
+ import { useMemo } from "react";
2755
2761
  import { Box as Box2, Text as Text2 } from "ink";
2756
2762
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
2757
2763
  var Overview;
@@ -2759,7 +2765,9 @@ var init_Overview = __esm({
2759
2765
  "src/mcp/ui/Overview.tsx"() {
2760
2766
  "use strict";
2761
2767
  init_Header();
2768
+ init_prompts2();
2762
2769
  Overview = ({ serverStatus, stats }) => {
2770
+ const agents = useMemo(() => getAllPrompts(), []);
2763
2771
  return /* @__PURE__ */ jsxs(Box2, { flexDirection: "column", flexGrow: 1, children: [
2764
2772
  /* @__PURE__ */ jsx2(Header, {}),
2765
2773
  /* @__PURE__ */ jsxs(Box2, { borderStyle: "round", padding: 1, borderColor: "white", flexDirection: "column", flexGrow: 1, children: [
@@ -2786,23 +2794,33 @@ var init_Overview = __esm({
2786
2794
  ] })
2787
2795
  ] })
2788
2796
  ] }),
2789
- /* @__PURE__ */ jsxs(Box2, { marginTop: 1, borderStyle: "single", borderColor: "gray", flexDirection: "column", paddingX: 1, children: [
2790
- /* @__PURE__ */ jsx2(Text2, { bold: true, children: "Usage Tips:" }),
2791
- /* @__PURE__ */ jsxs(Text2, { children: [
2792
- "\u2022 ",
2793
- /* @__PURE__ */ jsx2(Text2, { color: "yellow", children: "init" }),
2794
- ': "Initialize project context"'
2795
- ] }),
2796
- /* @__PURE__ */ jsxs(Text2, { children: [
2797
- "\u2022 ",
2798
- /* @__PURE__ */ jsx2(Text2, { color: "yellow", children: "plan" }),
2799
- ': "Create a plan for [task]"'
2800
- ] }),
2801
- /* @__PURE__ */ jsxs(Text2, { children: [
2802
- "\u2022 ",
2803
- /* @__PURE__ */ jsx2(Text2, { color: "yellow", children: "doctor" }),
2804
- ': "Check project health"'
2805
- ] })
2797
+ /* @__PURE__ */ jsxs(Box2, { marginTop: 1, borderStyle: "single", borderColor: "gray", flexDirection: "column", paddingX: 1, flexGrow: 1, children: [
2798
+ /* @__PURE__ */ jsx2(Text2, { bold: true, children: "Available Agents & Instructions:" }),
2799
+ agents.map((agent) => /* @__PURE__ */ jsxs(Box2, { flexDirection: "column", marginTop: 1, children: [
2800
+ /* @__PURE__ */ jsxs(Text2, { color: "yellow", children: [
2801
+ "\u27A4 ",
2802
+ agent.name,
2803
+ " ",
2804
+ /* @__PURE__ */ jsxs(Text2, { color: "dim", children: [
2805
+ "(",
2806
+ agent.id,
2807
+ ")"
2808
+ ] })
2809
+ ] }),
2810
+ /* @__PURE__ */ jsxs(Text2, { color: "white", children: [
2811
+ " ",
2812
+ agent.description
2813
+ ] }),
2814
+ agent.arguments.length > 0 && /* @__PURE__ */ jsxs(Text2, { color: "dim", children: [
2815
+ " Args: ",
2816
+ agent.arguments.map((a) => a.name + (a.required ? "*" : "")).join(", ")
2817
+ ] }),
2818
+ /* @__PURE__ */ jsxs(Text2, { color: "cyan", children: [
2819
+ ' Instruction: "Use the ',
2820
+ agent.name,
2821
+ ' to..."'
2822
+ ] })
2823
+ ] }, agent.id))
2806
2824
  ] }),
2807
2825
  /* @__PURE__ */ jsxs(Box2, { marginTop: 1, flexDirection: "column", children: [
2808
2826
  /* @__PURE__ */ jsx2(Text2, { color: "dim", children: "Controls:" }),
@@ -3170,7 +3188,7 @@ var App_exports = {};
3170
3188
  __export(App_exports, {
3171
3189
  App: () => App
3172
3190
  });
3173
- import { useState as useState4, useEffect as useEffect3, useMemo, useCallback } from "react";
3191
+ import { useState as useState4, useEffect as useEffect3, useMemo as useMemo2, useCallback } from "react";
3174
3192
  import { Box as Box10, useInput as useInput3, useApp } from "ink";
3175
3193
  import fs15 from "fs";
3176
3194
  import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
@@ -3212,7 +3230,7 @@ var init_App = __esm({
3212
3230
  setConfig(loadMCPConfig());
3213
3231
  setProjects(scanForProjects());
3214
3232
  }, []);
3215
- const exposedProjects = useMemo(
3233
+ const exposedProjects = useMemo2(
3216
3234
  () => projects.filter((p) => {
3217
3235
  const cfg = config.projects.find(
3218
3236
  (c) => c.path && c.path === p.path || !c.path && c.name === p.name
@@ -3693,7 +3711,10 @@ async function runSetupFlow(workspacePath, workspaceName, existingProjects) {
3693
3711
  }
3694
3712
  const tools = await promptTools();
3695
3713
  const exposeToMCP = await promptMCPExposure();
3696
- const linkedProjects = await promptLinkedProjects(existingProjects);
3714
+ let linkedProjects = [];
3715
+ if (storageMode !== "global") {
3716
+ linkedProjects = await promptLinkedProjects(existingProjects);
3717
+ }
3697
3718
  const addToGitignore = await promptGitignore();
3698
3719
  const enableRAG = await promptRAG();
3699
3720
  const confirmed = await promptConfirmation();
@@ -3998,16 +4019,18 @@ ${dataPaths.map((p) => ` \u2022 ${p}`).join("\n")}`,
3998
4019
  copyDirToAllStoragePaths(path17.join(agentCoreDir, "templates"), "templates", [dataPath]);
3999
4020
  }
4000
4021
  const configFilePath = getConfigPath(workspacePath);
4001
- const configContent = fs18.readFileSync(configFilePath, "utf-8");
4002
- if (configContent.includes("copilot: true")) {
4003
- const copilotPath = getAgentPromptPath(workspacePath, "copilot");
4004
- ensureDir(copilotPath);
4005
- copyPromptsToDir(prompts, copilotPath, ".agent.md");
4006
- }
4007
- if (configContent.includes("antigravity: true")) {
4008
- const antigravityPath = getAgentPromptPath(workspacePath, "antigravity");
4009
- ensureDir(antigravityPath);
4010
- copyPromptsToDir(prompts, antigravityPath, ".md");
4022
+ if (fs18.existsSync(configFilePath)) {
4023
+ const configContent = fs18.readFileSync(configFilePath, "utf-8");
4024
+ if (configContent.includes("copilot: true")) {
4025
+ const copilotPath = getAgentPromptPath(workspacePath, "copilot");
4026
+ ensureDir(copilotPath);
4027
+ copyPromptsToDir(prompts, copilotPath, ".agent.md");
4028
+ }
4029
+ if (configContent.includes("antigravity: true")) {
4030
+ const antigravityPath = getAgentPromptPath(workspacePath, "antigravity");
4031
+ ensureDir(antigravityPath);
4032
+ copyPromptsToDir(prompts, antigravityPath, ".md");
4033
+ }
4011
4034
  }
4012
4035
  s.stop("Update complete");
4013
4036
  const summary = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrce-workflow",
3
- "version": "0.2.55",
3
+ "version": "0.2.57",
4
4
  "description": "RRCE-Workflow TUI - Agentic code workflow generator for AI-assisted development",
5
5
  "author": "RRCE Team",
6
6
  "license": "MIT",