@securityreviewai/vibereview-cli 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -60,7 +60,15 @@ function unwrapKnownWrapper(value) {
|
|
|
60
60
|
if (isRecord(value.result))
|
|
61
61
|
return value.result;
|
|
62
62
|
if (typeof value.result === "string") {
|
|
63
|
-
|
|
63
|
+
try {
|
|
64
|
+
return unwrapProviderOutput(value.result);
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
if (error instanceof GuardrailOutputError) {
|
|
68
|
+
throw new GuardrailOutputError(`provider result contained ${value.result.length} characters but no valid guardrail JSON`);
|
|
69
|
+
}
|
|
70
|
+
throw error;
|
|
71
|
+
}
|
|
64
72
|
}
|
|
65
73
|
return value;
|
|
66
74
|
}
|
|
@@ -30,6 +30,7 @@ export function buildGenerationPrompt(input) {
|
|
|
30
30
|
if (input.repairError) {
|
|
31
31
|
sections.push("<repair_request>", `Your previous response failed validation: ${input.repairError}`, "Return a corrected JSON object only.", "<previous_response>", (input.previousResponse ?? "").slice(0, 30_000), "</previous_response>", "</repair_request>");
|
|
32
32
|
}
|
|
33
|
+
sections.push("<final_response_requirement>", "Return exactly one JSON object that conforms to the output contract.", "The first non-whitespace character must be { and the last must be }.", "Do not return a plan, explanation, acknowledgement, Markdown fence, or tool call.", "When no repository-specific rule qualifies, return a valid object with an empty guardrails array.", "</final_response_requirement>");
|
|
33
34
|
return `${sections.join("\n")}\n`;
|
|
34
35
|
}
|
|
35
36
|
//# sourceMappingURL=generation-prompt.js.map
|