rrce-workflow 0.2.69 → 0.2.71
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/README.md +16 -12
- package/dist/index.js +39 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,19 +66,23 @@ The easiest way to connect is via the TUI (`npx rrce-workflow mcp` -> **Install*
|
|
|
66
66
|
|
|
67
67
|
#### OpenCode
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
69
|
+
RRCE-Workflow integrates with OpenCode both as an MCP server and by providing **Custom Primary Agents**.
|
|
70
|
+
|
|
71
|
+
1. **Register MCP Server**: Add the following to `~/.config/opencode/opencode.json`:
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"$schema": "https://opencode.ai/config.json",
|
|
75
|
+
"mcp": {
|
|
76
|
+
"rrce": {
|
|
77
|
+
"type": "local",
|
|
78
|
+
"command": ["npx", "-y", "rrce-workflow", "mcp", "start"],
|
|
79
|
+
"enabled": true
|
|
80
|
+
}
|
|
81
|
+
}
|
|
78
82
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
2. **Install Agents**: Run `npx rrce-workflow` and select **OpenCode** as a tool. This will generate specialized primary agents (Research, Planning, etc.) in `.opencode/agent/` that you can cycle through using the **Tab** key in the OpenCode TUI.
|
|
82
86
|
|
|
83
87
|
#### VSCode (with MCP Extension)
|
|
84
88
|
Add to `.vscode/mcp.json`:
|
package/dist/index.js
CHANGED
|
@@ -1241,6 +1241,7 @@ var init_prompts = __esm({
|
|
|
1241
1241
|
// src/commands/wizard/utils.ts
|
|
1242
1242
|
import * as fs7 from "fs";
|
|
1243
1243
|
import * as path8 from "path";
|
|
1244
|
+
import { stringify } from "yaml";
|
|
1244
1245
|
function copyPromptsToDir(prompts, targetDir, extension) {
|
|
1245
1246
|
for (const prompt of prompts) {
|
|
1246
1247
|
const baseName = path8.basename(prompt.filePath, ".md");
|
|
@@ -1250,6 +1251,23 @@ function copyPromptsToDir(prompts, targetDir, extension) {
|
|
|
1250
1251
|
fs7.writeFileSync(targetPath, content);
|
|
1251
1252
|
}
|
|
1252
1253
|
}
|
|
1254
|
+
function convertToOpenCodeAgent(prompt) {
|
|
1255
|
+
const { frontmatter, content } = prompt;
|
|
1256
|
+
const tools = {};
|
|
1257
|
+
if (frontmatter.tools) {
|
|
1258
|
+
for (const tool of frontmatter.tools) {
|
|
1259
|
+
tools[`rrce_${tool}`] = true;
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
const opencodeFrontmatter = {
|
|
1263
|
+
description: frontmatter.description,
|
|
1264
|
+
mode: "primary",
|
|
1265
|
+
tools: Object.keys(tools).length > 0 ? tools : void 0
|
|
1266
|
+
};
|
|
1267
|
+
return `---
|
|
1268
|
+
${stringify(opencodeFrontmatter)}---
|
|
1269
|
+
${content}`;
|
|
1270
|
+
}
|
|
1253
1271
|
function copyDirRecursive(src, dest) {
|
|
1254
1272
|
const entries = fs7.readdirSync(src, { withFileTypes: true });
|
|
1255
1273
|
for (const entry of entries) {
|
|
@@ -1608,17 +1626,29 @@ function installAgentPrompts(config, workspacePath, dataPaths) {
|
|
|
1608
1626
|
syncMetadataToAll(agentCoreDir, dataPaths);
|
|
1609
1627
|
copyDirToAllStoragePaths(path11.join(agentCoreDir, "templates"), "templates", dataPaths);
|
|
1610
1628
|
copyDirToAllStoragePaths(path11.join(agentCoreDir, "prompts"), "prompts", dataPaths);
|
|
1611
|
-
|
|
1629
|
+
const needsIDEPrompts = config.storageMode === "workspace" && (config.tools.includes("copilot") || config.tools.includes("antigravity")) || config.tools.includes("opencode");
|
|
1630
|
+
if (needsIDEPrompts) {
|
|
1612
1631
|
const prompts = loadPromptsFromDir(getAgentCorePromptsDir());
|
|
1613
|
-
if (config.
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1632
|
+
if (config.storageMode === "workspace") {
|
|
1633
|
+
if (config.tools.includes("copilot")) {
|
|
1634
|
+
const copilotPath = getAgentPromptPath(workspacePath, "copilot");
|
|
1635
|
+
ensureDir(copilotPath);
|
|
1636
|
+
copyPromptsToDir(prompts, copilotPath, ".agent.md");
|
|
1637
|
+
}
|
|
1638
|
+
if (config.tools.includes("antigravity")) {
|
|
1639
|
+
const antigravityPath = getAgentPromptPath(workspacePath, "antigravity");
|
|
1640
|
+
ensureDir(antigravityPath);
|
|
1641
|
+
copyPromptsToDir(prompts, antigravityPath, ".md");
|
|
1642
|
+
}
|
|
1617
1643
|
}
|
|
1618
|
-
if (config.tools.includes("
|
|
1619
|
-
const
|
|
1620
|
-
ensureDir(
|
|
1621
|
-
|
|
1644
|
+
if (config.tools.includes("opencode")) {
|
|
1645
|
+
const opencodePath = path11.join(workspacePath, ".opencode", "agent");
|
|
1646
|
+
ensureDir(opencodePath);
|
|
1647
|
+
for (const prompt of prompts) {
|
|
1648
|
+
const baseName = path11.basename(prompt.filePath, ".md");
|
|
1649
|
+
const content = convertToOpenCodeAgent(prompt);
|
|
1650
|
+
fs10.writeFileSync(path11.join(opencodePath, `${baseName}.md`), content);
|
|
1651
|
+
}
|
|
1622
1652
|
}
|
|
1623
1653
|
}
|
|
1624
1654
|
}
|