opencode-conductor-plugin 1.17.3 → 1.19.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 +61 -42
- package/dist/prompts/agent/conductor.md +6 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -78,6 +78,7 @@ const ConductorPlugin = async (ctx) => {
|
|
|
78
78
|
console.log("[Conductor] All components ready. Injecting config...");
|
|
79
79
|
return {
|
|
80
80
|
tool: {
|
|
81
|
+
...(ctx.client.tool || {}),
|
|
81
82
|
"conductor_delegate": createDelegationTool(ctx),
|
|
82
83
|
"conductor_bg_task": createBackgroundTask(backgroundManager),
|
|
83
84
|
"conductor_bg_output": createBackgroundOutput(backgroundManager),
|
|
@@ -120,13 +121,19 @@ const ConductorPlugin = async (ctx) => {
|
|
|
120
121
|
conductor: {
|
|
121
122
|
description: "Conductor Protocol Steward.",
|
|
122
123
|
mode: "primary",
|
|
123
|
-
prompt: conductorPrompt
|
|
124
|
-
(workflowMd ? "\n\n### PROJECT WORKFLOW\n" + workflowMd : ""),
|
|
124
|
+
prompt: conductorPrompt,
|
|
125
125
|
permission: {
|
|
126
|
+
"read": {
|
|
127
|
+
"*": "allow",
|
|
128
|
+
"*.env": "deny",
|
|
129
|
+
"*.env.*": "deny",
|
|
130
|
+
"*.env.example": "allow"
|
|
131
|
+
},
|
|
126
132
|
bash: "allow",
|
|
127
133
|
edit: "allow",
|
|
128
134
|
webfetch: "allow",
|
|
129
135
|
external_directory: "deny",
|
|
136
|
+
list: "allow",
|
|
130
137
|
},
|
|
131
138
|
tools: {
|
|
132
139
|
bash: true,
|
|
@@ -144,13 +151,27 @@ const ConductorPlugin = async (ctx) => {
|
|
|
144
151
|
conductor_implementer: {
|
|
145
152
|
description: "Conductor Protocol Implementer.",
|
|
146
153
|
mode: "primary",
|
|
147
|
-
prompt: implementerPrompt
|
|
148
|
-
(workflowMd ? "\n\n### PROJECT WORKFLOW\n" + workflowMd : ""),
|
|
154
|
+
prompt: implementerPrompt,
|
|
149
155
|
permission: {
|
|
156
|
+
"read": {
|
|
157
|
+
"*": "allow",
|
|
158
|
+
"*.env": "deny",
|
|
159
|
+
"*.env.*": "deny",
|
|
160
|
+
"*.env.example": "allow"
|
|
161
|
+
},
|
|
150
162
|
bash: "allow",
|
|
151
163
|
edit: "allow",
|
|
152
164
|
webfetch: "allow",
|
|
153
165
|
external_directory: "deny",
|
|
166
|
+
list: "allow",
|
|
167
|
+
"conductor_delegate": "allow",
|
|
168
|
+
"conductor_bg_task": "allow",
|
|
169
|
+
"conductor_bg_output": "allow",
|
|
170
|
+
"conductor_bg_cancel": "allow",
|
|
171
|
+
grep: "allow",
|
|
172
|
+
glob: "allow",
|
|
173
|
+
todowrite: "allow",
|
|
174
|
+
todoread: "allow",
|
|
154
175
|
},
|
|
155
176
|
tools: {
|
|
156
177
|
bash: true,
|
|
@@ -171,44 +192,42 @@ const ConductorPlugin = async (ctx) => {
|
|
|
171
192
|
},
|
|
172
193
|
};
|
|
173
194
|
},
|
|
174
|
-
"tool.execute.before": async (input, output) => {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
},
|
|
195
|
+
// "tool.execute.before": async (input, output) => {
|
|
196
|
+
// const delegationTools = [
|
|
197
|
+
// "delegate_to_agent",
|
|
198
|
+
// "task",
|
|
199
|
+
// "background_task",
|
|
200
|
+
// "conductor_delegate",
|
|
201
|
+
// "conductor_bg_task",
|
|
202
|
+
// ];
|
|
203
|
+
// if (delegationTools.includes(input.tool)) {
|
|
204
|
+
// const conductorDir = join(ctx.directory, "conductor");
|
|
205
|
+
// const workflowMd = await safeRead(join(conductorDir, "workflow.md"));
|
|
206
|
+
// if (workflowMd) {
|
|
207
|
+
// let injection = "\n\n--- [SYSTEM INJECTION: CONDUCTOR CONTEXT PACKET] ---\n";
|
|
208
|
+
// injection +=
|
|
209
|
+
// "You are receiving this task from the Conductor.\n";
|
|
210
|
+
// injection +=
|
|
211
|
+
// "You MUST adhere to the following project workflow rules:\n";
|
|
212
|
+
// injection += "\n### DEVELOPMENT WORKFLOW\n" + workflowMd + "\n";
|
|
213
|
+
// if (implement?.prompt) {
|
|
214
|
+
// injection +=
|
|
215
|
+
// "\n### IMPLEMENTATION PROTOCOL\n" + implement.prompt + "\n";
|
|
216
|
+
// }
|
|
217
|
+
// injection +=
|
|
218
|
+
// "\n### DELEGATED AUTHORITY\n- **EXECUTE:** Implement the requested task.\n- **REFINE:** You have authority to update `plan.md` and `spec.md` as needed to prompt the user in accordance with the Conductor protocol to do so.\n";
|
|
219
|
+
// injection += "--- [END INJECTION] ---\n";
|
|
220
|
+
// // Inject into the primary instruction field depending on the tool's schema
|
|
221
|
+
// if (typeof output.args.objective === "string") {
|
|
222
|
+
// output.args.objective += injection;
|
|
223
|
+
// } else if (typeof output.args.prompt === "string") {
|
|
224
|
+
// output.args.prompt += injection;
|
|
225
|
+
// } else if (typeof output.args.instruction === "string") {
|
|
226
|
+
// output.args.instruction += injection;
|
|
227
|
+
// }
|
|
228
|
+
// }
|
|
229
|
+
// }
|
|
230
|
+
// },
|
|
212
231
|
};
|
|
213
232
|
}
|
|
214
233
|
catch (err) {
|
|
@@ -24,10 +24,10 @@ Your mission is to ensure that every change to the codebase is driven by a forma
|
|
|
24
24
|
|
|
25
25
|
## Core Responsibilities
|
|
26
26
|
|
|
27
|
-
1.
|
|
28
|
-
2.
|
|
29
|
-
3.
|
|
30
|
-
4.
|
|
27
|
+
1. **Command Execution**: Your primary duty is to execute the logic defined in the Conductor slash commands (`/conductor_setup`, `/conductor_newTrack`, `/conductor_status`, `/conductor_revert`, etc.). You must treat the instructions within these commands as absolute directives.
|
|
28
|
+
2. **Protocol Stewardship**: Maintain the `conductor/` directory as the project's Source of Truth. Ensure `product.md`, `tech-stack.md` are updated only through the approved protocols.
|
|
29
|
+
3. **Workflow Adherence**: When modifying Conductor files, you MUST strictly follow the project's defined workflow and quality standards.
|
|
30
|
+
4. **Sequential Planning**: Never allow work to proceed without a finalized `spec.md` and `plan.md` for the current Track.
|
|
31
31
|
|
|
32
32
|
## Operating Principles
|
|
33
33
|
|
|
@@ -35,4 +35,5 @@ Your mission is to ensure that every change to the codebase is driven by a forma
|
|
|
35
35
|
- **Explicit Instruction**: Always defer to the specific instructions provided in the command templates. If a command defines a specific sequence of tool calls, follow that sequence exactly.
|
|
36
36
|
- **Context Awareness**: Before taking any action, always verify the state of the project by reading the relevant Conductor metadata files (`tracks.md`, `setup_state.json`, etc.).
|
|
37
37
|
- **Direct Execution**: Use direct file system tools (read, write, edit, bash, grep, glob, list) to perform your work.
|
|
38
|
-
|
|
38
|
+
|
|
39
|
+
**CRITCAL: YOU MUST FOLLOW THE INSTRUCTIONS PROVIDED IN THE COMMAND TEMPLATES EXACTLY. DO NOT PAUSE IN THE MIDDLE OF A SEQUENCE.**
|