feat(ulw-loop): require Oracle verification before completion
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -135,16 +135,20 @@ export function createChatMessageHandler(args: {
|
||||
const isRalphLoopTemplate =
|
||||
promptText.includes("You are starting a Ralph Loop") &&
|
||||
promptText.includes("<user-task>")
|
||||
const isUlwLoopTemplate =
|
||||
promptText.includes("You are starting an ULTRAWORK Loop") &&
|
||||
promptText.includes("<user-task>")
|
||||
const isCancelRalphTemplate = promptText.includes(
|
||||
"Cancel the currently active Ralph Loop",
|
||||
)
|
||||
|
||||
if (isRalphLoopTemplate) {
|
||||
if (isRalphLoopTemplate || isUlwLoopTemplate) {
|
||||
const taskMatch = promptText.match(/<user-task>\s*([\s\S]*?)\s*<\/user-task>/i)
|
||||
const rawTask = taskMatch?.[1]?.trim() || ""
|
||||
const parsedArguments = parseRalphLoopArguments(rawTask)
|
||||
|
||||
hooks.ralphLoop.startLoop(input.sessionID, parsedArguments.prompt, {
|
||||
ultrawork: isUlwLoopTemplate,
|
||||
maxIterations: parsedArguments.maxIterations,
|
||||
completionPromise: parsedArguments.completionPromise,
|
||||
strategy: parsedArguments.strategy,
|
||||
|
||||
Reference in New Issue
Block a user