Let General Chat search the web, and only General Chat
Search is the one capability that fits the profile holding none: every other capability either reads this installation or changes it, and chat's whole contract is that it can do neither. The assistant deliberately does not get it — its contract is that answers come from this install's own documents, and a web result there is an answer that looks sourced and is not. A chat question about this machine hands off to the assistant before the search would run, so it never reaches the internet even with the box ticked. Off by default, and not because it is dangerous: searching sends the operator's question outside the house, which is theirs to decide. Asked for per turn as well as enabled in conf. Provider-agnostic, as asked — searxng, brave, tavily. Only whichever is configured here can be verified; all three read every field by name, so a shape that changes underneath yields no results rather than wrong ones. The explain fixtures asserted chat holds no capabilities at all, which is exactly the guarantee worth keeping. caps=only: now states the set rather than its emptiness, so the check still fails the day something else is granted there.
This commit is contained in:
@@ -117,8 +117,21 @@ while IFS= read -r raw || [[ -n "$raw" ]]; do
|
||||
exp=$([[ "$want" == "yes" ]] && echo YES || echo no)
|
||||
[[ "$got_diag" == "$exp" ]] || problems+=("diagnostic: want $exp, got $got_diag") ;;
|
||||
caps)
|
||||
# none holds nothing at all
|
||||
# only:a,b holds exactly these and nothing else
|
||||
# a holds at least this
|
||||
#
|
||||
# only: exists because General Chat's guarantee is not "it can search" but "search
|
||||
# is the only thing it can do". A presence check would still pass on the day
|
||||
# something else is granted there, which is the day the check was written for.
|
||||
if [[ "$want" == "none" ]]; then
|
||||
[[ "$got_caps" == "(none"* ]] || problems+=("caps: want none, got $got_caps")
|
||||
elif [[ "$want" == only:* ]]; then
|
||||
want_set="${want#only:}"
|
||||
got_set="$(printf '%s' "$got_caps" | tr -d ' ' | tr ',' '\n' | sort | paste -sd, -)"
|
||||
exp_set="$(printf '%s' "$want_set" | tr -d ' ' | tr ',' '\n' | sort | paste -sd, -)"
|
||||
[[ "$got_set" == "$exp_set" ]] \
|
||||
|| problems+=("caps: want exactly [$exp_set], got [$got_set]")
|
||||
else
|
||||
[[ "$got_caps" == *"$want"* ]] || problems+=("caps: want $want in [$got_caps]")
|
||||
fi ;;
|
||||
|
||||
Reference in New Issue
Block a user