opencode-conductor-plugin 1.13.0 → 1.15.0
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 +17 -21
- package/dist/prompts/strategies/delegate.md +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { tool } from "@opencode-ai/plugin/tool";
|
|
2
1
|
import { join, dirname } from "path";
|
|
3
2
|
import { homedir } from "os";
|
|
4
3
|
import { existsSync, readFileSync } from "fs";
|
|
@@ -52,7 +51,7 @@ const ConductorPlugin = async (ctx) => {
|
|
|
52
51
|
// 3. Load Strategies
|
|
53
52
|
let strategySection = "";
|
|
54
53
|
try {
|
|
55
|
-
const strategyFile =
|
|
54
|
+
const strategyFile = "manual.md"; // Force manual strategy for now
|
|
56
55
|
const strategyPath = join(__dirname, "prompts", "strategies", strategyFile);
|
|
57
56
|
strategySection = await readFile(strategyPath, "utf-8");
|
|
58
57
|
}
|
|
@@ -72,22 +71,15 @@ const ConductorPlugin = async (ctx) => {
|
|
|
72
71
|
const agentPrompt = agentMd.split("---").pop()?.trim() || "";
|
|
73
72
|
console.log("[Conductor] All components ready. Injecting config...");
|
|
74
73
|
return {
|
|
75
|
-
tool: {
|
|
76
|
-
"conductor_health": tool({
|
|
77
|
-
description: "Health check",
|
|
78
|
-
args: {},
|
|
79
|
-
async execute() { return "Conductor is active."; }
|
|
80
|
-
})
|
|
81
|
-
},
|
|
82
74
|
config: async (config) => {
|
|
83
75
|
console.log("[Conductor] config handler: Merging commands and agent...");
|
|
84
76
|
config.command = {
|
|
85
77
|
...(config.command || {}),
|
|
86
|
-
"conductor:setup": { template: setup.prompt, description: setup.description, agent: "conductor"
|
|
87
|
-
"conductor:newTrack": { template: newTrack.prompt, description: newTrack.description, agent: "conductor"
|
|
88
|
-
"conductor:implement": { template: implement.prompt, description: implement.description
|
|
89
|
-
"conductor:status": { template: status.prompt, description: status.description, agent: "conductor"
|
|
90
|
-
"conductor:revert": { template: revert.prompt, description: revert.description, agent: "conductor"
|
|
78
|
+
"conductor:setup": { template: setup.prompt, description: setup.description, agent: "conductor" },
|
|
79
|
+
"conductor:newTrack": { template: newTrack.prompt, description: newTrack.description, agent: "conductor" },
|
|
80
|
+
"conductor:implement": { template: implement.prompt, description: implement.description },
|
|
81
|
+
"conductor:status": { template: status.prompt, description: status.description, agent: "conductor" },
|
|
82
|
+
"conductor:revert": { template: revert.prompt, description: revert.description, agent: "conductor" }
|
|
91
83
|
};
|
|
92
84
|
config.agent = {
|
|
93
85
|
...(config.agent || {}),
|
|
@@ -96,19 +88,20 @@ const ConductorPlugin = async (ctx) => {
|
|
|
96
88
|
mode: "primary",
|
|
97
89
|
prompt: agentPrompt,
|
|
98
90
|
permission: {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
91
|
+
edit: "allow",
|
|
92
|
+
bash: "allow",
|
|
93
|
+
webfetch: "allow",
|
|
94
|
+
doom_loop: "allow",
|
|
95
|
+
external_directory: "deny"
|
|
104
96
|
}
|
|
105
97
|
}
|
|
106
98
|
};
|
|
107
99
|
},
|
|
108
100
|
"tool.execute.before": async (input, output) => {
|
|
109
101
|
if (input.tool === "delegate_to_agent") {
|
|
110
|
-
const agentName = (output.args.agent_name || output.args.agent || "")
|
|
111
|
-
|
|
102
|
+
const agentName = (output.args.agent_name || output.args.agent || "");
|
|
103
|
+
// Sisyphus must be capital S
|
|
104
|
+
if (agentName.includes("Sisyphus")) {
|
|
112
105
|
const conductorDir = join(ctx.directory, "conductor");
|
|
113
106
|
const safeRead = async (path) => {
|
|
114
107
|
try {
|
|
@@ -124,6 +117,9 @@ const ConductorPlugin = async (ctx) => {
|
|
|
124
117
|
if (workflowMd) {
|
|
125
118
|
injection += "\n### DEVELOPMENT WORKFLOW\n" + workflowMd + "\n";
|
|
126
119
|
}
|
|
120
|
+
if (implement?.prompt) {
|
|
121
|
+
injection += "\n### IMPLEMENTATION PROTOCOL\n" + implement.prompt + "\n";
|
|
122
|
+
}
|
|
127
123
|
injection += "\n### DELEGATED AUTHORITY\n- **EXECUTE:** Implement the requested task.\n- **REFINE:** You have authority to update `plan.md`.\n";
|
|
128
124
|
injection += "--- [END INJECTION] ---\n";
|
|
129
125
|
output.args.objective += injection;
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
You are acting as the **Architect**. Your responsibility is to oversee the track while delegating execution to **Sisyphus**.
|
|
3
3
|
|
|
4
4
|
**DIRECTIVE:**
|
|
5
|
-
1. **
|
|
6
|
-
|
|
5
|
+
1. **Execution Strategy:** You have the authority to decide between **direct implementation** and **delegation**.
|
|
6
|
+
* **Direct Implementation:** Perform the task yourself if it is straightforward, involves minor changes, or if you are confident in the solution.
|
|
7
|
+
* **Delegation:** Delegate to `@sisyphus` for complex, multi-file, or heavy-lifting implementation tasks.
|
|
8
|
+
2. **Delegation Protocol:** If you choose to delegate, call `@sisyphus`.
|
|
7
9
|
* *Note:* The system will automatically inject the full project context for you.
|
|
8
10
|
* *Instruction:* Tell Sisyphus: "Execute this task. You have authority to update `plan.md` if needed. Report 'PLAN_UPDATED' if you do."
|
|
9
11
|
3. **Verify:**
|