mirror of
https://github.com/gnekt/My-Brain-Is-Full-Crew.git
synced 2026-09-12 16:56:44 +00:00
Fix adapters to follow the same template.
fix: restore adapter_build() contract, revert function renames Both adapters now export adapter_build() and adapter_translate_*() as the uniform public contract. scripts/build.sh sources one adapter and calls adapter_build uniformly. Private helpers (_oc_*) and vocabulary tables (cc_capability_to_tools, oc_capability_to_permission, etc.) retain their prefixes. CC regression and OC unit tests all pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> fix(tests): restore test_oc_ prefix on adapter_build end-to-end test
This commit is contained in:
@@ -211,10 +211,9 @@ adapter_translate_agents() {
|
||||
local caps; caps="$(parse_capabilities "$agent")"
|
||||
|
||||
# Build tools allowlist by expanding each capability.
|
||||
# read → Read (only); Glob and Grep are appended at the end if read is present.
|
||||
local tools="" has_read=0
|
||||
# read → Read, Glob, Grep; other capabilities follow.
|
||||
local tools=""
|
||||
for cap in $caps; do
|
||||
[[ "$cap" == "read" ]] && has_read=1
|
||||
local expansion; expansion="$(cc_capability_to_tools "$cap")"
|
||||
[[ -n "$expansion" ]] || continue
|
||||
for tool in $expansion; do
|
||||
@@ -224,11 +223,11 @@ adapter_translate_agents() {
|
||||
tools="$tools, $tool"
|
||||
fi
|
||||
done
|
||||
# If this was "read", immediately append Glob and Grep
|
||||
if [[ "$cap" == "read" ]]; then
|
||||
tools="$tools, Glob, Grep"
|
||||
fi
|
||||
done
|
||||
# Append Glob and Grep after all other tools when read capability is present
|
||||
if [[ $has_read -eq 1 ]]; then
|
||||
tools="$tools, Glob, Grep"
|
||||
fi
|
||||
|
||||
local out_file="$out_dir/$(basename "$agent")"
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user