Replaces single 'workMode' with two distinct settings: 1. Plugin-level 'projectExecution' (parallel | sequential) - parallel: each project can have active workers independently - sequential: only one project can have active workers at a time 2. Project-level 'roleExecution' (parallel | sequential) - parallel: DEV and QA can run simultaneously on same project - sequential: only one role (DEV or QA) active at a time per project Changes: - index.ts: rename workMode → projectExecution in config schema - projects.ts: add roleExecution field to Project type - heartbeat_tick: check both levels before picking up tasks - task_pickup: enforce roleExecution when picking up manually - project_register: accept roleExecution param (default: parallel) - devclaw_setup: accept projectExecution param All defaults remain 'parallel' for backward compatibility.
This commit is contained in:
@@ -229,6 +229,18 @@ export function createTaskPickupTool(api: OpenClawPluginApi) {
|
||||
);
|
||||
}
|
||||
|
||||
// 6b. Check project-level roleExecution
|
||||
const roleExecution = project.roleExecution ?? "parallel";
|
||||
if (roleExecution === "sequential") {
|
||||
const otherRole = role === "dev" ? "qa" : "dev";
|
||||
const otherWorker = getWorker(project, otherRole);
|
||||
if (otherWorker.active) {
|
||||
throw new Error(
|
||||
`Project "${project.name}" has sequential roleExecution: ${otherRole.toUpperCase()} worker is active (issue: ${otherWorker.issueId}). Wait for it to complete first.`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// 7. Select model (priority: param > tier label > heuristic)
|
||||
const targetLabel: StateLabel = role === "dev" ? "Doing" : "Testing";
|
||||
let modelAlias: string;
|
||||
|
||||
Reference in New Issue
Block a user