const NONCE_REFUSAL_MARKERS = [ "token", "secret", "local file", "uuid-named file", "uuid named file", "parrot back", "disclose", "can't help", "can’t help", "cannot help", "can't comply", "can’t comply", "cannot comply", "isn't a real openclaw probe", "is not a real openclaw probe", "not a real openclaw probe", "no part of the system asks me",
];
export function isLikelyToolNonceRefusal(text: string): boolean { const lower = normalizeLowercaseStringOrEmpty(text); if (PROBE_REFUSAL_MARKERS.some((marker) => lower.includes(marker))) { returntrue;
} if (lower.includes("nonce")) { return NONCE_REFUSAL_MARKERS.some((marker) => lower.includes(marker));
} returnfalse;
}
function hasMalformedToolOutput(text: string): boolean { const trimmed = text.trim(); if (!trimmed) { returntrue;
} const lower = normalizeLowercaseStringOrEmpty(trimmed); if (trimmed.includes("[object Object]")) { returntrue;
} if (
lower.includes("try reading the file again") ||
lower.includes("trying to read the file again") ||
lower.includes("try the read tool again") ||
lower.includes("file wasn't found immediately after") ||
lower.includes("file wasn't found immediately") ||
lower.includes("verify the file exists and read it again") ||
lower.includes("file read failed because the file was not found") ||
lower.includes("verify the file creation and read it again")
) { returntrue;
} if (/\bread\s*\[/.test(lower) || /\btool\b/.test(lower) || /\bfunction\b/.test(lower)) { returntrue;
} returnfalse;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.