fix(kernel): Enable Universal Reasoning Fallback (resolves Bouncer-hijacking bug)
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s

This commit is contained in:
2026-04-19 17:11:53 -04:00
parent d4fb6630d3
commit cce760932e
4 changed files with 34 additions and 36 deletions

View File

@@ -17,11 +17,12 @@
(load-time 0))
(defun find-triggered-skill (context)
"Returns the highest priority skill whose trigger condition matches the context."
"Returns the highest priority skill whose trigger matches context AND has a probabilistic prompt."
(let ((triggered nil))
(maphash (lambda (name skill)
(declare (ignore name))
(when (ignore-errors (funcall (skill-trigger-fn skill) context))
(when (and (skill-probabilistic-prompt skill)
(ignore-errors (funcall (skill-trigger-fn skill) context)))
(push skill triggered)))
*skills-registry*)
(first (sort triggered #'> :key #'skill-priority))))