@gobing-ai/superskill 0.2.6 → 0.2.7
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.
- package/dist/index.js +13 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -97548,6 +97548,18 @@ var RED_FLAG_PATTERNS = [
|
|
|
97548
97548
|
/Probably|Likely|Possibly/gi,
|
|
97549
97549
|
/(?:As far as|If I) (?:know|recall)/gi
|
|
97550
97550
|
];
|
|
97551
|
+
function buildStopOutput(result) {
|
|
97552
|
+
if (result.ok) {
|
|
97553
|
+
return JSON.stringify({
|
|
97554
|
+
hookSpecificOutput: { hookEventName: "Stop", additionalContext: result.reason }
|
|
97555
|
+
});
|
|
97556
|
+
}
|
|
97557
|
+
return JSON.stringify({
|
|
97558
|
+
decision: "block",
|
|
97559
|
+
reason: result.reason,
|
|
97560
|
+
hookSpecificOutput: { hookEventName: "Stop" }
|
|
97561
|
+
});
|
|
97562
|
+
}
|
|
97551
97563
|
function extractLastAssistantMessage(context3) {
|
|
97552
97564
|
const messages2 = context3.messages ?? [];
|
|
97553
97565
|
for (let i2 = messages2.length - 1;i2 >= 0; i2--) {
|
|
@@ -97721,7 +97733,7 @@ var ccAntiHallucination = {
|
|
|
97721
97733
|
run(env) {
|
|
97722
97734
|
const argumentsJson = env.ARGUMENTS ?? "{}";
|
|
97723
97735
|
const allowStop = (feedback, ok) => ({
|
|
97724
|
-
output:
|
|
97736
|
+
output: buildStopOutput({ ok, reason: feedback }),
|
|
97725
97737
|
exitCode: ok ? 0 : 1
|
|
97726
97738
|
});
|
|
97727
97739
|
let context3;
|