rrce-workflow 0.2.54 → 0.2.56
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/dist/index.js +75 -27
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1167,7 +1167,6 @@ function installAgentPrompts(config, workspacePath, dataPaths) {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
1169
|
function createWorkspaceConfig(config, workspacePath, workspaceName) {
|
|
1170
|
-
if (config.storageMode !== "workspace") return;
|
|
1171
1170
|
const configPath = path10.join(workspacePath, ".rrce-workflow", "config.yaml");
|
|
1172
1171
|
ensureDir(path10.dirname(configPath));
|
|
1173
1172
|
let content = `# RRCE-Workflow Configuration
|
|
@@ -2028,7 +2027,10 @@ function getAllPrompts() {
|
|
|
2028
2027
|
required: false
|
|
2029
2028
|
})));
|
|
2030
2029
|
}
|
|
2030
|
+
const filename = p.filePath.split("/").pop() || "";
|
|
2031
|
+
const id = filename.replace(/\.md$/, "");
|
|
2031
2032
|
return {
|
|
2033
|
+
id,
|
|
2032
2034
|
name: p.frontmatter.name,
|
|
2033
2035
|
description: p.frontmatter.description,
|
|
2034
2036
|
arguments: args,
|
|
@@ -2037,7 +2039,11 @@ function getAllPrompts() {
|
|
|
2037
2039
|
});
|
|
2038
2040
|
}
|
|
2039
2041
|
function getPromptDef(name) {
|
|
2040
|
-
|
|
2042
|
+
const all = getAllPrompts();
|
|
2043
|
+
const search = name.toLowerCase();
|
|
2044
|
+
return all.find(
|
|
2045
|
+
(p) => p.name === name || p.id === name || p.name.toLowerCase() === search || p.id.toLowerCase() === search
|
|
2046
|
+
);
|
|
2041
2047
|
}
|
|
2042
2048
|
function renderPrompt(content, args) {
|
|
2043
2049
|
let rendered = content;
|
|
@@ -2085,7 +2091,7 @@ function registerToolHandlers(server) {
|
|
|
2085
2091
|
},
|
|
2086
2092
|
{
|
|
2087
2093
|
name: "list_projects",
|
|
2088
|
-
description: "List all projects exposed via MCP",
|
|
2094
|
+
description: "List all projects exposed via MCP. Use these names for project-specific tools.",
|
|
2089
2095
|
inputSchema: { type: "object", properties: {} }
|
|
2090
2096
|
},
|
|
2091
2097
|
{
|
|
@@ -2099,12 +2105,12 @@ function registerToolHandlers(server) {
|
|
|
2099
2105
|
},
|
|
2100
2106
|
{
|
|
2101
2107
|
name: "list_agents",
|
|
2102
|
-
description: "List available
|
|
2108
|
+
description: "List available agents (e.g. init, plan) and their arguments. Use this to discover which agent to call.",
|
|
2103
2109
|
inputSchema: { type: "object", properties: {} }
|
|
2104
2110
|
},
|
|
2105
2111
|
{
|
|
2106
2112
|
name: "get_agent_prompt",
|
|
2107
|
-
description:
|
|
2113
|
+
description: 'Get the system prompt for a specific agent. Accepts agent Name (e.g. "RRCE Init") or ID (e.g. "init").',
|
|
2108
2114
|
inputSchema: {
|
|
2109
2115
|
type: "object",
|
|
2110
2116
|
properties: {
|
|
@@ -2141,17 +2147,20 @@ function registerToolHandlers(server) {
|
|
|
2141
2147
|
}
|
|
2142
2148
|
case "list_projects": {
|
|
2143
2149
|
const projects = getExposedProjects();
|
|
2150
|
+
const list = projects.map((p) => ({ name: p.name, source: p.source, path: p.path }));
|
|
2144
2151
|
return {
|
|
2145
2152
|
content: [{
|
|
2146
2153
|
type: "text",
|
|
2147
|
-
text: JSON.stringify(
|
|
2154
|
+
text: JSON.stringify(list, null, 2) + "\n\nTip: Use these project names for tools like `get_project_context` or `index_knowledge`."
|
|
2148
2155
|
}]
|
|
2149
2156
|
};
|
|
2150
2157
|
}
|
|
2151
2158
|
case "get_project_context": {
|
|
2152
2159
|
const context = getProjectContext(args.project);
|
|
2153
2160
|
if (!context) {
|
|
2154
|
-
const
|
|
2161
|
+
const projects = getExposedProjects().map((p) => p.name).join(", ");
|
|
2162
|
+
const msg = `No project context found for "${args.project}".
|
|
2163
|
+
Available projects: ${projects}`;
|
|
2155
2164
|
logger.warn(msg);
|
|
2156
2165
|
return { content: [{ type: "text", text: msg }], isError: true };
|
|
2157
2166
|
}
|
|
@@ -2164,9 +2173,10 @@ function registerToolHandlers(server) {
|
|
|
2164
2173
|
type: "text",
|
|
2165
2174
|
text: JSON.stringify(prompts.map((p) => ({
|
|
2166
2175
|
name: p.name,
|
|
2176
|
+
id: p.id,
|
|
2167
2177
|
description: p.description,
|
|
2168
2178
|
arguments: p.arguments
|
|
2169
|
-
})), null, 2)
|
|
2179
|
+
})), null, 2) + "\n\nTip: Retrieve the prompt for an agent using `get_agent_prompt` with its name or ID."
|
|
2170
2180
|
}]
|
|
2171
2181
|
};
|
|
2172
2182
|
}
|
|
@@ -2175,7 +2185,8 @@ function registerToolHandlers(server) {
|
|
|
2175
2185
|
const agentName = params.agent;
|
|
2176
2186
|
const promptDef = getPromptDef(agentName);
|
|
2177
2187
|
if (!promptDef) {
|
|
2178
|
-
|
|
2188
|
+
const available = getAllPrompts().map((p) => `${p.name} (id: ${p.id})`).join(", ");
|
|
2189
|
+
throw new Error(`Agent not found: ${agentName}. Available agents: ${available}`);
|
|
2179
2190
|
}
|
|
2180
2191
|
const renderArgs = params.args || {};
|
|
2181
2192
|
const stringArgs = {};
|
|
@@ -2757,14 +2768,46 @@ var init_Overview = __esm({
|
|
|
2757
2768
|
return /* @__PURE__ */ jsxs(Box2, { flexDirection: "column", flexGrow: 1, children: [
|
|
2758
2769
|
/* @__PURE__ */ jsx2(Header, {}),
|
|
2759
2770
|
/* @__PURE__ */ jsxs(Box2, { borderStyle: "round", padding: 1, borderColor: "white", flexDirection: "column", flexGrow: 1, children: [
|
|
2760
|
-
/* @__PURE__ */
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2771
|
+
/* @__PURE__ */ jsxs(Box2, { justifyContent: "space-between", children: [
|
|
2772
|
+
/* @__PURE__ */ jsxs(Box2, { flexDirection: "column", children: [
|
|
2773
|
+
/* @__PURE__ */ jsx2(Text2, { bold: true, underline: true, children: "System Status" }),
|
|
2774
|
+
/* @__PURE__ */ jsxs(Box2, { marginTop: 1, children: [
|
|
2775
|
+
/* @__PURE__ */ jsx2(Text2, { children: "Integrations Installed: " }),
|
|
2776
|
+
/* @__PURE__ */ jsx2(Text2, { color: stats.installedIntegrations > 0 ? "green" : "yellow", children: stats.installedIntegrations })
|
|
2777
|
+
] }),
|
|
2778
|
+
/* @__PURE__ */ jsxs(Box2, { children: [
|
|
2779
|
+
/* @__PURE__ */ jsx2(Text2, { children: "Server Port: " }),
|
|
2780
|
+
/* @__PURE__ */ jsx2(Text2, { color: "cyan", children: serverStatus.port })
|
|
2781
|
+
] })
|
|
2782
|
+
] }),
|
|
2783
|
+
/* @__PURE__ */ jsxs(Box2, { flexDirection: "column", marginLeft: 4, children: [
|
|
2784
|
+
/* @__PURE__ */ jsx2(Text2, { bold: true, underline: true, children: "Quick Start" }),
|
|
2785
|
+
/* @__PURE__ */ jsxs(Box2, { marginTop: 1, flexDirection: "column", children: [
|
|
2786
|
+
/* @__PURE__ */ jsx2(Text2, { children: '1. Install "MCP" extension in VSCode / Antigravity' }),
|
|
2787
|
+
/* @__PURE__ */ jsx2(Text2, { children: "2. Configure Extension to use this server:" }),
|
|
2788
|
+
/* @__PURE__ */ jsx2(Text2, { color: "dim", children: " (This is handled automatically by 'Install to IDE')" }),
|
|
2789
|
+
/* @__PURE__ */ jsx2(Text2, { children: "3. In your Agent IDE, ask:" }),
|
|
2790
|
+
/* @__PURE__ */ jsx2(Text2, { color: "cyan", children: ' "Use the rrce tools to analyze this project"' })
|
|
2791
|
+
] })
|
|
2792
|
+
] })
|
|
2764
2793
|
] }),
|
|
2765
|
-
/* @__PURE__ */ jsxs(Box2, { children: [
|
|
2766
|
-
/* @__PURE__ */ jsx2(Text2, { children: "
|
|
2767
|
-
/* @__PURE__ */
|
|
2794
|
+
/* @__PURE__ */ jsxs(Box2, { marginTop: 1, borderStyle: "single", borderColor: "gray", flexDirection: "column", paddingX: 1, children: [
|
|
2795
|
+
/* @__PURE__ */ jsx2(Text2, { bold: true, children: "Usage Tips:" }),
|
|
2796
|
+
/* @__PURE__ */ jsxs(Text2, { children: [
|
|
2797
|
+
"\u2022 ",
|
|
2798
|
+
/* @__PURE__ */ jsx2(Text2, { color: "yellow", children: "init" }),
|
|
2799
|
+
': "Initialize project context"'
|
|
2800
|
+
] }),
|
|
2801
|
+
/* @__PURE__ */ jsxs(Text2, { children: [
|
|
2802
|
+
"\u2022 ",
|
|
2803
|
+
/* @__PURE__ */ jsx2(Text2, { color: "yellow", children: "plan" }),
|
|
2804
|
+
': "Create a plan for [task]"'
|
|
2805
|
+
] }),
|
|
2806
|
+
/* @__PURE__ */ jsxs(Text2, { children: [
|
|
2807
|
+
"\u2022 ",
|
|
2808
|
+
/* @__PURE__ */ jsx2(Text2, { color: "yellow", children: "doctor" }),
|
|
2809
|
+
': "Check project health"'
|
|
2810
|
+
] })
|
|
2768
2811
|
] }),
|
|
2769
2812
|
/* @__PURE__ */ jsxs(Box2, { marginTop: 1, flexDirection: "column", children: [
|
|
2770
2813
|
/* @__PURE__ */ jsx2(Text2, { color: "dim", children: "Controls:" }),
|
|
@@ -3655,7 +3698,10 @@ async function runSetupFlow(workspacePath, workspaceName, existingProjects) {
|
|
|
3655
3698
|
}
|
|
3656
3699
|
const tools = await promptTools();
|
|
3657
3700
|
const exposeToMCP = await promptMCPExposure();
|
|
3658
|
-
|
|
3701
|
+
let linkedProjects = [];
|
|
3702
|
+
if (storageMode !== "global") {
|
|
3703
|
+
linkedProjects = await promptLinkedProjects(existingProjects);
|
|
3704
|
+
}
|
|
3659
3705
|
const addToGitignore = await promptGitignore();
|
|
3660
3706
|
const enableRAG = await promptRAG();
|
|
3661
3707
|
const confirmed = await promptConfirmation();
|
|
@@ -3960,16 +4006,18 @@ ${dataPaths.map((p) => ` \u2022 ${p}`).join("\n")}`,
|
|
|
3960
4006
|
copyDirToAllStoragePaths(path17.join(agentCoreDir, "templates"), "templates", [dataPath]);
|
|
3961
4007
|
}
|
|
3962
4008
|
const configFilePath = getConfigPath(workspacePath);
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
4009
|
+
if (fs18.existsSync(configFilePath)) {
|
|
4010
|
+
const configContent = fs18.readFileSync(configFilePath, "utf-8");
|
|
4011
|
+
if (configContent.includes("copilot: true")) {
|
|
4012
|
+
const copilotPath = getAgentPromptPath(workspacePath, "copilot");
|
|
4013
|
+
ensureDir(copilotPath);
|
|
4014
|
+
copyPromptsToDir(prompts, copilotPath, ".agent.md");
|
|
4015
|
+
}
|
|
4016
|
+
if (configContent.includes("antigravity: true")) {
|
|
4017
|
+
const antigravityPath = getAgentPromptPath(workspacePath, "antigravity");
|
|
4018
|
+
ensureDir(antigravityPath);
|
|
4019
|
+
copyPromptsToDir(prompts, antigravityPath, ".md");
|
|
4020
|
+
}
|
|
3973
4021
|
}
|
|
3974
4022
|
s.stop("Update complete");
|
|
3975
4023
|
const summary = [
|