mirror of
https://github.com/gnekt/My-Brain-Is-Full-Crew.git
synced 2026-09-08 14:56:20 +00:00
build(adapters): claude-code adapter skeleton with capability/event tables build(claude-code): adapter_translate_dispatcher with test build(claude-code): adapter_translate_references with test build(claude-code): adapter_translate_skills with tests build(claude-code): adapter_translate_agents with capability→tools mapping build(claude-code): hook wrapper template (CC native → neutral schema) build(claude-code): adapter_translate_hooks with wrapper generation build(claude-code): adapter_translate_mcp with hand-rolled YAML parser build(claude-code): adapter_finalize and complete adapter_build wiring build: scripts/build.sh dispatches to per-framework adapter Also fix adapter_translate_hooks and adapter_translate_agents to use while-read loops (avoiding word-splitting on paths with spaces) and guard grep calls with || true to survive set -eo pipefail when hooks have no match-tool field. Remove scripts/build.sh from .gitignore. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
872 B
Bash
Executable File
24 lines
872 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# =============================================================================
|
|
# Generated by adapters/claude-code/adapter.sh — do not edit.
|
|
# Wrapper for hook: __HOOK_NAME__
|
|
# Reads Claude Code native PreToolUse/PostToolUse/Notification JSON from stdin,
|
|
# transforms it into the neutral schema, and pipes the result to __HOOK_NAME__.sh.
|
|
# =============================================================================
|
|
set -eo pipefail
|
|
|
|
INPUT=$(cat)
|
|
HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
# Translate CC native fields to the neutral schema
|
|
NEUTRAL=$(echo "$INPUT" | jq -c '{
|
|
event: "__EVENT_NAME__",
|
|
tool: (.tool_name // ""),
|
|
args: (.tool_input // {title: .title, message: .message}),
|
|
session_id: (.session_id // ""),
|
|
cwd: (.cwd // ""),
|
|
framework: "claude-code"
|
|
}')
|
|
|
|
echo "$NEUTRAL" | bash "$HOOK_DIR/__HOOK_NAME__.sh"
|