opencode-orchestrator 0.6.5 → 0.6.6
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 +41 -25
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16610,34 +16610,50 @@ var OrchestratorPlugin = async (input) => {
|
|
|
16610
16610
|
const sessionID = msgInput.sessionID;
|
|
16611
16611
|
const agentName = (msgInput.agent || "").toLowerCase();
|
|
16612
16612
|
log2("[index.ts] chat.message hook", { sessionID, agent: agentName, textLength: originalText.length });
|
|
16613
|
-
if (agentName === AGENT_NAMES.COMMANDER
|
|
16614
|
-
|
|
16615
|
-
|
|
16616
|
-
|
|
16617
|
-
|
|
16618
|
-
|
|
16619
|
-
|
|
16620
|
-
|
|
16621
|
-
|
|
16622
|
-
|
|
16623
|
-
|
|
16624
|
-
|
|
16625
|
-
|
|
16626
|
-
|
|
16627
|
-
|
|
16628
|
-
|
|
16629
|
-
|
|
16630
|
-
|
|
16631
|
-
|
|
16632
|
-
|
|
16633
|
-
|
|
16634
|
-
|
|
16635
|
-
|
|
16636
|
-
|
|
16613
|
+
if (agentName === AGENT_NAMES.COMMANDER) {
|
|
16614
|
+
if (!sessions.has(sessionID)) {
|
|
16615
|
+
const now = Date.now();
|
|
16616
|
+
sessions.set(sessionID, {
|
|
16617
|
+
active: true,
|
|
16618
|
+
step: 0,
|
|
16619
|
+
maxSteps: DEFAULT_MAX_STEPS,
|
|
16620
|
+
timestamp: now,
|
|
16621
|
+
startTime: now,
|
|
16622
|
+
lastStepTime: now
|
|
16623
|
+
});
|
|
16624
|
+
state.missionActive = true;
|
|
16625
|
+
state.sessions.set(sessionID, {
|
|
16626
|
+
enabled: true,
|
|
16627
|
+
iterations: 0,
|
|
16628
|
+
taskRetries: /* @__PURE__ */ new Map(),
|
|
16629
|
+
currentTask: "",
|
|
16630
|
+
anomalyCount: 0
|
|
16631
|
+
});
|
|
16632
|
+
startSession(sessionID);
|
|
16633
|
+
emit(TASK_EVENTS.STARTED, {
|
|
16634
|
+
taskId: sessionID,
|
|
16635
|
+
agent: AGENT_NAMES.COMMANDER,
|
|
16636
|
+
description: "Mission started"
|
|
16637
|
+
});
|
|
16638
|
+
}
|
|
16639
|
+
if (!parsed || parsed.command !== "task") {
|
|
16640
|
+
const taskTemplate = COMMANDS["task"].template;
|
|
16641
|
+
const userMessage = parsed?.args || originalText;
|
|
16642
|
+
parts[textPartIndex].text = taskTemplate.replace(
|
|
16643
|
+
/\$ARGUMENTS/g,
|
|
16644
|
+
userMessage || PROMPTS.CONTINUE
|
|
16645
|
+
);
|
|
16646
|
+
log2("[index.ts] Auto-applied mission mode", { originalLength: originalText.length });
|
|
16647
|
+
}
|
|
16637
16648
|
}
|
|
16638
16649
|
if (parsed) {
|
|
16639
16650
|
const command = COMMANDS[parsed.command];
|
|
16640
|
-
if (command) {
|
|
16651
|
+
if (command && agentName !== AGENT_NAMES.COMMANDER) {
|
|
16652
|
+
parts[textPartIndex].text = command.template.replace(
|
|
16653
|
+
/\$ARGUMENTS/g,
|
|
16654
|
+
parsed.args || PROMPTS.CONTINUE
|
|
16655
|
+
);
|
|
16656
|
+
} else if (command && parsed.command === "task") {
|
|
16641
16657
|
parts[textPartIndex].text = command.template.replace(
|
|
16642
16658
|
/\$ARGUMENTS/g,
|
|
16643
16659
|
parsed.args || PROMPTS.CONTINUE
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "opencode-orchestrator",
|
|
3
3
|
"displayName": "OpenCode Orchestrator",
|
|
4
4
|
"description": "Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).",
|
|
5
|
-
"version": "0.6.
|
|
5
|
+
"version": "0.6.6",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|