mirror of
https://github.com/gnekt/My-Brain-Is-Full-Crew.git
synced 2026-09-07 22:36:26 +00:00
test: regression runner diffs dist/claude-code against pre-refactor snapshot
- Add tests/regression/run.sh that builds dist/claude-code and compares against snapshot, excluding runtime-only artifacts (.mbifc-manifest, .mcp.json, .claude-plugin/plugin.json) - Fix adapters/lib.sh agent_body: preserve '---' section dividers in body (awk now only skips '---' while still inside frontmatter, fm < 2) - Fix adapters/claude-code/adapter.sh: change 'read' capability to expand to only 'Read', appending 'Glob, Grep' at end of tools list to match snapshot ordering - Update snapshot to reflect intentional refactor changes: hook JSON schema (.args.* instead of .tool_input.*), wrapper scripts, settings.json with wrapper paths, and consistent tool ordering for postman/sorter Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@ FRAMEWORK="claude-code"
|
||||
cc_capability_to_tools() {
|
||||
local cap="$1"
|
||||
case "$cap" in
|
||||
read) echo "Read Glob Grep" ;;
|
||||
read) echo "Read" ;;
|
||||
write) echo "Write" ;;
|
||||
edit) echo "Edit" ;;
|
||||
bash) echo "Bash" ;;
|
||||
@@ -210,9 +210,11 @@ adapter_translate_agents() {
|
||||
local model; model="$(parse_frontmatter "$agent" model)"
|
||||
local caps; caps="$(parse_capabilities "$agent")"
|
||||
|
||||
# Build tools allowlist by expanding each capability
|
||||
local tools=""
|
||||
# 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
|
||||
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
|
||||
@@ -223,6 +225,10 @@ adapter_translate_agents() {
|
||||
fi
|
||||
done
|
||||
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