@stupidloud/codegraph 0.7.20 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -48
- package/dist/bin/codegraph.js +25 -0
- package/dist/bin/codegraph.js.map +1 -1
- package/dist/extraction/index.d.ts.map +1 -1
- package/dist/extraction/index.js +63 -37
- package/dist/extraction/index.js.map +1 -1
- package/dist/installer/config-writer.d.ts.map +1 -1
- package/dist/installer/config-writer.js +3 -1
- package/dist/installer/config-writer.js.map +1 -1
- package/dist/installer/index.d.ts +12 -0
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +72 -4
- package/dist/installer/index.js.map +1 -1
- package/dist/installer/instructions-template.d.ts +2 -2
- package/dist/installer/instructions-template.d.ts.map +1 -1
- package/dist/installer/instructions-template.js +4 -2
- package/dist/installer/instructions-template.js.map +1 -1
- package/dist/installer/targets/claude.d.ts +10 -6
- package/dist/installer/targets/claude.d.ts.map +1 -1
- package/dist/installer/targets/claude.js +72 -10
- package/dist/installer/targets/claude.js.map +1 -1
- package/dist/mcp/index.d.ts +8 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +116 -18
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/server-instructions.d.ts +1 -1
- package/dist/mcp/server-instructions.d.ts.map +1 -1
- package/dist/mcp/server-instructions.js +15 -0
- package/dist/mcp/server-instructions.js.map +1 -1
- package/dist/mcp/tools.d.ts +14 -0
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +90 -15
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp/transport.d.ts +17 -0
- package/dist/mcp/transport.d.ts.map +1 -1
- package/dist/mcp/transport.js +63 -0
- package/dist/mcp/transport.js.map +1 -1
- package/dist/resolution/frameworks/index.d.ts +1 -0
- package/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/dist/resolution/frameworks/index.js +5 -1
- package/dist/resolution/frameworks/index.js.map +1 -1
- package/dist/resolution/frameworks/nestjs.d.ts +26 -0
- package/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
- package/dist/resolution/frameworks/nestjs.js +374 -0
- package/dist/resolution/frameworks/nestjs.js.map +1 -0
- package/dist/sync/git-hooks.d.ts +45 -0
- package/dist/sync/git-hooks.d.ts.map +1 -0
- package/dist/sync/git-hooks.js +223 -0
- package/dist/sync/git-hooks.js.map +1 -0
- package/dist/sync/index.d.ts +4 -0
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +12 -1
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/watch-policy.d.ts +48 -0
- package/dist/sync/watch-policy.d.ts.map +1 -0
- package/dist/sync/watch-policy.js +124 -0
- package/dist/sync/watch-policy.js.map +1 -0
- package/dist/sync/watcher.d.ts.map +1 -1
- package/dist/sync/watcher.js +10 -0
- package/dist/sync/watcher.js.map +1 -1
- package/package.json +3 -3
- package/scripts/agent-eval/audit.sh +68 -0
- package/scripts/agent-eval/itrun.sh +1 -1
- package/scripts/agent-eval/run-all.sh +67 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# With/without A/B (and optional interactive) eval for a codegraph version on a
|
|
3
|
+
# repo. Codegraph is the ONLY variable: both arms launch claude with
|
|
4
|
+
# --strict-mcp-config — with = codegraph-only MCP (pointed at $CG_BIN),
|
|
5
|
+
# without = empty MCP. Built-in Read/Grep/Bash stay available in both arms.
|
|
6
|
+
#
|
|
7
|
+
# Usage: run-all.sh <repo-path> "<question>" [headless|tmux|all]
|
|
8
|
+
# Env: CG_BIN codegraph binary (default: command -v codegraph)
|
|
9
|
+
# AGENT_EVAL_OUT output dir (default: /tmp/agent-eval)
|
|
10
|
+
set -uo pipefail
|
|
11
|
+
|
|
12
|
+
REPO="${1:?usage: run-all.sh <repo-path> \"<question>\" [headless|tmux|all]}"
|
|
13
|
+
Q="${2:?question required}"
|
|
14
|
+
MODE="${3:-headless}"
|
|
15
|
+
CG_BIN="${CG_BIN:-$(command -v codegraph)}"
|
|
16
|
+
OUT="${AGENT_EVAL_OUT:-/tmp/agent-eval}"
|
|
17
|
+
HARNESS="$(cd "$(dirname "$0")" && pwd)"
|
|
18
|
+
mkdir -p "$OUT"
|
|
19
|
+
|
|
20
|
+
[ -n "$CG_BIN" ] || { echo "no codegraph binary on PATH (set CG_BIN)"; exit 1; }
|
|
21
|
+
[ -d "$REPO/.codegraph" ] || { echo "no .codegraph index at $REPO — index it first"; exit 1; }
|
|
22
|
+
case "$MODE" in headless|tmux|all) ;; *) echo "mode must be headless|tmux|all (got '$MODE')"; exit 1;; esac
|
|
23
|
+
|
|
24
|
+
# MCP config files (path form avoids inline-JSON quoting through tmux).
|
|
25
|
+
cat > "$OUT/mcp-codegraph.json" <<JSON
|
|
26
|
+
{"mcpServers":{"codegraph":{"command":"$CG_BIN","args":["serve","--mcp","--path","$REPO"]}}}
|
|
27
|
+
JSON
|
|
28
|
+
echo '{"mcpServers":{}}' > "$OUT/mcp-empty.json"
|
|
29
|
+
|
|
30
|
+
echo "###### codegraph: $CG_BIN"
|
|
31
|
+
echo "###### repo: $REPO"
|
|
32
|
+
echo "###### question: $Q"
|
|
33
|
+
echo
|
|
34
|
+
|
|
35
|
+
# Headless arm: claude -p with stream-json -> exact tool sequence + tokens/cost.
|
|
36
|
+
headless() {
|
|
37
|
+
local label="$1" cfg="$2"
|
|
38
|
+
echo "############################## HEADLESS [$label] ##############################"
|
|
39
|
+
( cd "$REPO" && claude -p "$Q" \
|
|
40
|
+
--output-format stream-json --verbose \
|
|
41
|
+
--permission-mode bypassPermissions \
|
|
42
|
+
--model opus \
|
|
43
|
+
--max-budget-usd 4 \
|
|
44
|
+
--strict-mcp-config --mcp-config "$cfg" \
|
|
45
|
+
> "$OUT/run-$label.jsonl" 2>"$OUT/run-$label.err" )
|
|
46
|
+
echo "exit $? -> $OUT/run-$label.jsonl ($(wc -l < "$OUT/run-$label.jsonl" | tr -d ' ') lines)"
|
|
47
|
+
tail -2 "$OUT/run-$label.err" 2>/dev/null
|
|
48
|
+
node "$HARNESS/parse-run.mjs" "$OUT/run-$label.jsonl" 2>&1 || true
|
|
49
|
+
echo
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if [ "$MODE" = headless ] || [ "$MODE" = all ]; then
|
|
53
|
+
headless "headless-with" "$OUT/mcp-codegraph.json"
|
|
54
|
+
headless "headless-without" "$OUT/mcp-empty.json"
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
if [ "$MODE" = tmux ] || [ "$MODE" = all ]; then
|
|
58
|
+
echo "############################## INTERACTIVE [with] ##############################"
|
|
59
|
+
CLAUDE_EXTRA_ARGS="--model opus --strict-mcp-config --mcp-config $OUT/mcp-codegraph.json" \
|
|
60
|
+
bash "$HARNESS/itrun.sh" "$REPO" "int-with" "$Q" 2>&1 || echo "[itrun WITH failed]"
|
|
61
|
+
echo
|
|
62
|
+
echo "############################## INTERACTIVE [without] ##############################"
|
|
63
|
+
CLAUDE_EXTRA_ARGS="--model opus --strict-mcp-config --mcp-config $OUT/mcp-empty.json" \
|
|
64
|
+
bash "$HARNESS/itrun.sh" "$REPO" "int-without" "$Q" 2>&1 || echo "[itrun WITHOUT failed]"
|
|
65
|
+
echo
|
|
66
|
+
fi
|
|
67
|
+
echo "############################## RUN-ALL COMPLETE ##############################"
|