MCPcopy
hub / github.com/Doorman11991/smallcode / looksLikeDoneClaim

Function looksLikeDoneClaim

src/session/contract_guard.js:36–42  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

34];
35
36function looksLikeDoneClaim(text) {
37 if (!text || typeof text !== 'string') return false;
38 // Skip if the text reads like a question or asks for input.
39 if (/[?]\s*$/.test(text.trim())) return false;
40 for (const re of DONE_PATTERNS) if (re.test(text)) return true;
41 return false;
42}
43
44/**
45 * Inspect a candidate final assistant message. If it claims completion while

Callers 2

contract.test.jsFile · 0.85
checkDoneGuardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected