feat: enhance workflow and testing infrastructure
- Introduced ExecutionMode type for project execution modes (parallel, sequential). - Updated SetupOpts to use ExecutionMode instead of string literals. - Enhanced workflow states to include a new "In Review" state with appropriate transitions. - Implemented TestHarness for end-to-end testing, including command interception and workspace setup. - Created TestProvider for in-memory issue tracking during tests. - Refactored project registration and setup tools to utilize ExecutionMode. - Updated various tools to ensure compatibility with new workflow and execution modes. - Added new dependencies: cockatiel for resilience and zod for schema validation.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
|
||||
import { HEARTBEAT_DEFAULTS } from "../services/heartbeat.js";
|
||||
import type { ExecutionMode } from "../workflow.js";
|
||||
|
||||
/**
|
||||
* Write DevClaw plugin config to openclaw.json plugins section.
|
||||
@@ -21,7 +22,7 @@ import { HEARTBEAT_DEFAULTS } from "../services/heartbeat.js";
|
||||
export async function writePluginConfig(
|
||||
api: OpenClawPluginApi,
|
||||
agentId?: string,
|
||||
projectExecution?: "parallel" | "sequential",
|
||||
projectExecution?: ExecutionMode,
|
||||
): Promise<void> {
|
||||
const config = api.runtime.config.loadConfig() as Record<string, unknown>;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import { createAgent, resolveWorkspacePath } from "./agent.js";
|
||||
import { writePluginConfig } from "./config.js";
|
||||
import { scaffoldWorkspace } from "./workspace.js";
|
||||
import { DATA_DIR } from "./migrate-layout.js";
|
||||
import type { ExecutionMode } from "../workflow.js";
|
||||
|
||||
export type ModelConfig = Record<string, Record<string, string>>;
|
||||
|
||||
@@ -33,7 +34,7 @@ export type SetupOpts = {
|
||||
/** Model overrides per role.level. Missing levels use defaults. */
|
||||
models?: Record<string, Partial<Record<string, string>>>;
|
||||
/** Plugin-level project execution mode: parallel or sequential. Default: parallel. */
|
||||
projectExecution?: "parallel" | "sequential";
|
||||
projectExecution?: ExecutionMode;
|
||||
};
|
||||
|
||||
export type SetupResult = {
|
||||
|
||||
Reference in New Issue
Block a user