Closes #1901 Add 'default_strategy' config option (default: 'continue') to control whether ralph-loop creates a new session per iteration ('reset') or keeps the same session ('continue'). The 'reset' strategy keeps the model in the smart zone by starting with fresh context for each iteration. Supports --strategy flag for per-command override.
14 lines
593 B
TypeScript
14 lines
593 B
TypeScript
import { z } from "zod"
|
|
|
|
export const RalphLoopConfigSchema = z.object({
|
|
/** Enable ralph loop functionality (default: false - opt-in feature) */
|
|
enabled: z.boolean().default(false),
|
|
/** Default max iterations if not specified in command (default: 100) */
|
|
default_max_iterations: z.number().min(1).max(1000).default(100),
|
|
/** Custom state file directory relative to project root (default: .opencode/) */
|
|
state_dir: z.string().optional(),
|
|
default_strategy: z.enum(["reset", "continue"]).default("continue"),
|
|
})
|
|
|
|
export type RalphLoopConfig = z.infer<typeof RalphLoopConfigSchema>
|