harness-evolver 3.1.1 → 3.2.0
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/.claude-plugin/plugin.json +20 -0
- package/hooks/hooks.json +15 -0
- package/hooks/session-start.sh +71 -0
- package/package.json +4 -2
- package/skills/evolve/SKILL.md +3 -2
- package/skills/setup/SKILL.md +3 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "harness-evolver",
|
|
3
|
+
"description": "LangSmith-native autonomous agent optimization — evolves LLM agent code using multi-agent proposers, LangSmith experiments, and git worktrees",
|
|
4
|
+
"version": "3.2.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Raphael Valdetaro"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://github.com/raphaelchristi/harness-evolver",
|
|
9
|
+
"repository": "https://github.com/raphaelchristi/harness-evolver",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"langsmith",
|
|
13
|
+
"optimization",
|
|
14
|
+
"evolution",
|
|
15
|
+
"llm",
|
|
16
|
+
"agent",
|
|
17
|
+
"evaluator",
|
|
18
|
+
"langsmith-cli"
|
|
19
|
+
]
|
|
20
|
+
}
|
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Harness Evolver — ensures Python deps and env vars are available each session",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"SessionStart": [
|
|
5
|
+
{
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh\""
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Harness Evolver — SessionStart hook
|
|
3
|
+
# Ensures Python venv, langsmith, langsmith-cli, and env vars are ready.
|
|
4
|
+
# Runs silently on every session start. Installs deps only if missing.
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
# Resolve paths — plugin root is set by Claude Code
|
|
9
|
+
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-}"
|
|
10
|
+
PLUGIN_DATA="${CLAUDE_PLUGIN_DATA:-}"
|
|
11
|
+
|
|
12
|
+
# Fallback: if running outside plugin system (npx install), use legacy paths
|
|
13
|
+
if [ -z "$PLUGIN_ROOT" ]; then
|
|
14
|
+
PLUGIN_ROOT="$HOME/.evolver"
|
|
15
|
+
PLUGIN_DATA="$HOME/.evolver"
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
TOOLS_DIR="$PLUGIN_ROOT/tools"
|
|
19
|
+
VENV_DIR="$PLUGIN_DATA/venv"
|
|
20
|
+
VENV_PY="$VENV_DIR/bin/python"
|
|
21
|
+
|
|
22
|
+
# --- 1. Create venv if missing ---
|
|
23
|
+
if [ ! -f "$VENV_PY" ]; then
|
|
24
|
+
if command -v uv >/dev/null 2>&1; then
|
|
25
|
+
uv venv "$VENV_DIR" >/dev/null 2>&1
|
|
26
|
+
else
|
|
27
|
+
python3 -m venv "$VENV_DIR" >/dev/null 2>&1
|
|
28
|
+
fi
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# --- 2. Install langsmith if missing ---
|
|
32
|
+
if [ -f "$VENV_PY" ]; then
|
|
33
|
+
"$VENV_PY" -c "import langsmith" 2>/dev/null || {
|
|
34
|
+
if command -v uv >/dev/null 2>&1; then
|
|
35
|
+
uv pip install --python "$VENV_PY" langsmith >/dev/null 2>&1
|
|
36
|
+
else
|
|
37
|
+
"$VENV_DIR/bin/pip" install --upgrade langsmith >/dev/null 2>&1 || \
|
|
38
|
+
"$VENV_PY" -m pip install --upgrade langsmith >/dev/null 2>&1
|
|
39
|
+
fi
|
|
40
|
+
}
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
# --- 3. Install langsmith-cli if missing ---
|
|
44
|
+
command -v langsmith-cli >/dev/null 2>&1 || {
|
|
45
|
+
if command -v uv >/dev/null 2>&1; then
|
|
46
|
+
uv tool install langsmith-cli >/dev/null 2>&1
|
|
47
|
+
else
|
|
48
|
+
pip install langsmith-cli >/dev/null 2>&1 || pip3 install langsmith-cli >/dev/null 2>&1
|
|
49
|
+
fi
|
|
50
|
+
} || true
|
|
51
|
+
|
|
52
|
+
# --- 4. Load API key from credentials file if not in env ---
|
|
53
|
+
if [ -z "${LANGSMITH_API_KEY:-}" ]; then
|
|
54
|
+
if [ "$(uname)" = "Darwin" ]; then
|
|
55
|
+
CREDS="$HOME/Library/Application Support/langsmith-cli/credentials"
|
|
56
|
+
else
|
|
57
|
+
CREDS="$HOME/.config/langsmith-cli/credentials"
|
|
58
|
+
fi
|
|
59
|
+
if [ -f "$CREDS" ]; then
|
|
60
|
+
KEY=$(grep '^LANGSMITH_API_KEY=' "$CREDS" 2>/dev/null | head -1 | cut -d= -f2-)
|
|
61
|
+
if [ -n "$KEY" ]; then
|
|
62
|
+
echo "export LANGSMITH_API_KEY=\"$KEY\"" >> "$CLAUDE_ENV_FILE"
|
|
63
|
+
fi
|
|
64
|
+
fi
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
# --- 5. Export env vars for skills ---
|
|
68
|
+
if [ -n "${CLAUDE_ENV_FILE:-}" ]; then
|
|
69
|
+
echo "export EVOLVER_TOOLS=\"$TOOLS_DIR\"" >> "$CLAUDE_ENV_FILE"
|
|
70
|
+
echo "export EVOLVER_PY=\"$VENV_PY\"" >> "$CLAUDE_ENV_FILE"
|
|
71
|
+
fi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harness-evolver",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "LangSmith-native autonomous agent optimization for Claude Code",
|
|
5
5
|
"author": "Raphael Valdetaro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"bin/",
|
|
25
25
|
"skills/",
|
|
26
26
|
"agents/",
|
|
27
|
-
"tools/"
|
|
27
|
+
"tools/",
|
|
28
|
+
"hooks/",
|
|
29
|
+
".claude-plugin/"
|
|
28
30
|
]
|
|
29
31
|
}
|
package/skills/evolve/SKILL.md
CHANGED
|
@@ -16,8 +16,9 @@ Run the autonomous propose-evaluate-iterate loop using LangSmith as the evaluati
|
|
|
16
16
|
## Resolve Tool Path and Python
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
# Prefer env vars set by plugin hook; fallback to legacy npx paths
|
|
20
|
+
TOOLS="${EVOLVER_TOOLS:-$([ -d ".evolver/tools" ] && echo ".evolver/tools" || echo "$HOME/.evolver/tools")}"
|
|
21
|
+
EVOLVER_PY="${EVOLVER_PY:-$([ -f "$HOME/.evolver/venv/bin/python" ] && echo "$HOME/.evolver/venv/bin/python" || echo "python3")}"
|
|
21
22
|
```
|
|
22
23
|
|
|
23
24
|
Use `$EVOLVER_PY` instead of `python3` for ALL tool invocations.
|
package/skills/setup/SKILL.md
CHANGED
|
@@ -38,8 +38,9 @@ The tools auto-load the key from the credentials file, but the env var takes pre
|
|
|
38
38
|
## Resolve Tool Path and Python
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
# Prefer env vars set by plugin hook; fallback to legacy npx paths
|
|
42
|
+
TOOLS="${EVOLVER_TOOLS:-$([ -d ".evolver/tools" ] && echo ".evolver/tools" || echo "$HOME/.evolver/tools")}"
|
|
43
|
+
EVOLVER_PY="${EVOLVER_PY:-$([ -f "$HOME/.evolver/venv/bin/python" ] && echo "$HOME/.evolver/venv/bin/python" || echo "python3")}"
|
|
43
44
|
```
|
|
44
45
|
|
|
45
46
|
Use `$EVOLVER_PY` instead of `python3` for ALL tool invocations. This ensures the venv with langsmith is used.
|