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:
10
lib/setup.ts
10
lib/setup.ts
@@ -32,6 +32,8 @@ export type SetupOpts = {
|
||||
workspacePath?: string;
|
||||
/** Model overrides per tier. Missing tiers use defaults. */
|
||||
models?: Partial<Record<Tier, string>>;
|
||||
/** Plugin-level project execution mode: parallel or sequential. Default: parallel. */
|
||||
projectExecution?: "parallel" | "sequential";
|
||||
};
|
||||
|
||||
export type SetupResult = {
|
||||
@@ -110,7 +112,7 @@ export async function runSetup(opts: SetupOpts): Promise<SetupResult> {
|
||||
}
|
||||
|
||||
// Write plugin config to openclaw.json (includes agentId in devClawAgentIds)
|
||||
await writePluginConfig(models, agentId);
|
||||
await writePluginConfig(models, agentId, opts.projectExecution);
|
||||
|
||||
// --- Step 3: Workspace files ---
|
||||
|
||||
@@ -284,6 +286,7 @@ async function resolveWorkspacePath(agentId: string): Promise<string> {
|
||||
async function writePluginConfig(
|
||||
models: Record<Tier, string>,
|
||||
agentId?: string,
|
||||
projectExecution?: "parallel" | "sequential",
|
||||
): Promise<void> {
|
||||
const configPath = path.join(
|
||||
process.env.HOME ?? "/home/lauren",
|
||||
@@ -303,6 +306,11 @@ async function writePluginConfig(
|
||||
// Write models
|
||||
config.plugins.entries.devclaw.config.models = { ...models };
|
||||
|
||||
// Write projectExecution if specified
|
||||
if (projectExecution) {
|
||||
config.plugins.entries.devclaw.config.projectExecution = projectExecution;
|
||||
}
|
||||
|
||||
// Configure subagent cleanup interval to 30 days (43200 minutes)
|
||||
// This keeps development sessions alive during active development
|
||||
if (!config.agents) config.agents = {};
|
||||
|
||||
Reference in New Issue
Block a user