rrce-workflow 0.3.2 → 0.3.3

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 +10 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1117,27 +1117,27 @@ function copyPromptsToDir(prompts, targetDir, extension) {
1117
1117
  }
1118
1118
  }
1119
1119
  function updateOpenCodeConfig(newAgents) {
1120
- const opencodePath = path8.join(os2.homedir(), ".config", "opencode", "opencode.json");
1120
+ const opencodePath = getOpenCodeConfigPath();
1121
1121
  if (!fs7.existsSync(opencodePath)) {
1122
1122
  return;
1123
1123
  }
1124
1124
  try {
1125
1125
  const config = JSON.parse(fs7.readFileSync(opencodePath, "utf8"));
1126
- if (!config.agents) {
1127
- config.agents = {};
1128
- }
1129
- const existingAgentKeys = Object.keys(config.agents);
1126
+ const agentConfig = config.agent ?? config.agents ?? {};
1127
+ const existingAgentKeys = Object.keys(agentConfig);
1130
1128
  const rrceKeys = existingAgentKeys.filter((key) => key.startsWith("rrce_"));
1131
1129
  for (const key of rrceKeys) {
1132
1130
  if (!newAgents[key]) {
1133
- delete config.agents[key];
1131
+ delete agentConfig[key];
1134
1132
  }
1135
1133
  }
1136
1134
  for (const [key, value] of Object.entries(newAgents)) {
1137
1135
  if (key.startsWith("rrce_")) {
1138
- config.agents[key] = value;
1136
+ agentConfig[key] = value;
1139
1137
  }
1140
1138
  }
1139
+ config.agent = agentConfig;
1140
+ if (config.agents) delete config.agents;
1141
1141
  fs7.writeFileSync(opencodePath, JSON.stringify(config, null, 2));
1142
1142
  } catch (e) {
1143
1143
  console.error("Failed to update OpenCode config:", e);
@@ -1207,9 +1207,9 @@ function surgicalUpdateOpenCodeAgents(prompts, mode, dataPath) {
1207
1207
  updateOpenCodeConfig(newAgents);
1208
1208
  if (fs7.existsSync(openCodeConfig)) {
1209
1209
  const config = JSON.parse(fs7.readFileSync(openCodeConfig, "utf8"));
1210
- if (!config.agents) config.agents = {};
1211
- if (!config.agents.plan) config.agents.plan = {};
1212
- config.agents.plan.disable = true;
1210
+ if (!config.agent) config.agent = {};
1211
+ if (!config.agent.plan) config.agent.plan = {};
1212
+ config.agent.plan.disable = true;
1213
1213
  fs7.writeFileSync(openCodeConfig, JSON.stringify(config, null, 2));
1214
1214
  }
1215
1215
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrce-workflow",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "RRCE-Workflow TUI - Agentic code workflow generator for AI-assisted development",
5
5
  "author": "RRCE Team",
6
6
  "license": "MIT",