backup current stable ejclaw state
This commit is contained in:
@@ -3,7 +3,11 @@ import { execFileSync } from 'child_process';
|
||||
import { isArbiterEnabled } from './config.js';
|
||||
import { updatePairedTaskIfUnchanged } from './db.js';
|
||||
import { logger } from './logger.js';
|
||||
import { parseVisibleVerdict, type VisibleVerdict } from './paired-verdict.js';
|
||||
import {
|
||||
parseReviewerVisibleVerdict,
|
||||
parseVisibleVerdict,
|
||||
type VisibleVerdict,
|
||||
} from './paired-verdict.js';
|
||||
import type { PairedTaskStatus } from './types.js';
|
||||
|
||||
export type CompletionSignal =
|
||||
@@ -14,9 +18,36 @@ export type CompletionSignal =
|
||||
| { kind: 'complete'; completionReason: 'done' | 'escalated' }
|
||||
| { kind: 'preserve_review_ready' };
|
||||
|
||||
export { parseVisibleVerdict };
|
||||
export { parseReviewerVisibleVerdict, parseVisibleVerdict };
|
||||
export type { VisibleVerdict };
|
||||
|
||||
export function isUserInputWaitVerdict(
|
||||
summary: string | null | undefined,
|
||||
): boolean {
|
||||
if (parseVisibleVerdict(summary) !== 'step_done') {
|
||||
return false;
|
||||
}
|
||||
|
||||
const text = (summary ?? '')
|
||||
.replace(/<internal>[\s\S]*?<\/internal>/g, '')
|
||||
.trim();
|
||||
if (!text) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const asksForUserInput =
|
||||
/(대기|기다리|보내\s*주|알려\s*주|주시면|끝나면|완료되면|그 전까지|더 안 보냅니다|추가 메시지 보류|whoami|사용자명|키\s*등록|공개키|인증 정보 부족)/i.test(
|
||||
text,
|
||||
);
|
||||
if (!asksForUserInput) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !/(수정|고쳐|고치|변경|구현|빌드|커밋|푸시|계속\s*진행|다음\s*단계\s*진행|후속\s*작업\s*계속|남은\s*(?:범위|작업))/i.test(
|
||||
text,
|
||||
);
|
||||
}
|
||||
|
||||
export function resolveOwnerCompletionSignal(args: {
|
||||
phase: 'normal' | 'finalize';
|
||||
visibleVerdict: VisibleVerdict;
|
||||
|
||||
Reference in New Issue
Block a user