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:
@@ -20,6 +20,7 @@ function buildPromisePattern(promise: string): RegExp {
|
||||
export function detectCompletionInTranscript(
|
||||
transcriptPath: string | undefined,
|
||||
promise: string,
|
||||
startedAt?: string,
|
||||
): boolean {
|
||||
if (!transcriptPath) return false
|
||||
|
||||
@@ -32,8 +33,9 @@ export function detectCompletionInTranscript(
|
||||
|
||||
for (const line of lines) {
|
||||
try {
|
||||
const entry = JSON.parse(line) as { type?: string }
|
||||
const entry = JSON.parse(line) as { type?: string; timestamp?: string }
|
||||
if (entry.type === "user") continue
|
||||
if (startedAt && entry.timestamp && entry.timestamp < startedAt) continue
|
||||
if (pattern.test(line)) return true
|
||||
} catch {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user