@tachikomagundam/abathur 0.2.4 → 0.2.6
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/config/genomes/historian.example.jsonc +1 -1
- package/dist/commands/genome.js +2 -2
- package/dist/commands/graft.js +1 -1
- package/dist/commands/run.js +1 -1
- package/dist/commands/self-eval.js +1 -1
- package/dist/commands/tombstone.js +2 -1
- package/dist/core/evolve/run-bench.js +4 -3
- package/dist/core/evolve/run-loop.js +24 -4
- package/dist/core/evolve/run-plan.js +7 -3
- package/dist/core/evolve/score-bank.js +214 -0
- package/dist/core/graft-rebench.js +3 -0
- package/dist/core/ledger.js +6 -1
- package/dist/core/promote.js +2 -1
- package/dist/core/spec.js +5 -1
- package/dist/core/stats-math.js +39 -0
- package/dist/core/stats.js +125 -33
- package/dist/test/historian-grader-integrity.test.js +1494 -2
- package/dist/test/historian-grader-io.test.js +4 -0
- package/dist/test/historian-run-scenario.test.js +42 -2
- package/dist/test/repopath-seams.test.js +54 -0
- package/dist/test/score-bank.test.js +235 -0
- package/dist/test/seam-gates.test.js +78 -0
- package/dist/test/selfmode-literal.test.js +153 -0
- package/dist/test/stats-acceptance.test.js +329 -0
- package/dist/test/stats.test.js +18 -0
- package/graders/historian/grader-core.d.mts +107 -2
- package/graders/historian/grader-core.mjs +1046 -3
- package/graders/historian/grader.mjs +21 -2
- package/graders/historian/judge-poststage-19.mjs +212 -0
- package/graders/historian/judge-poststage.mjs +195 -0
- package/graders/historian/mutate.sh +59 -19
- package/graders/historian/run-scenario-17.sh +34 -0
- package/graders/historian/run-scenario-19.sh +43 -0
- package/graders/historian/run-scenario.sh +24 -1
- package/package.json +1 -1
- package/plugin/abathur.ts +1 -1
|
@@ -20,6 +20,22 @@
|
|
|
20
20
|
set -euo pipefail
|
|
21
21
|
unit_id="${1:?usage: run-scenario.sh <unitId> <scenario-file> [repoRoot]}"
|
|
22
22
|
scenario_file="${2:?usage: run-scenario.sh <unitId> <scenario-file> [repoRoot]}"
|
|
23
|
+
# Per-unit hook dispatch (s19 autopsy 2026-09-25): a unit may own a hook script
|
|
24
|
+
# run-scenario-<NN>.sh that wraps THIS agent stage plus an instrumented poststage
|
|
25
|
+
# (e.g. the R6-termb 蜂判 for scenario-19). The registered runCommand is one
|
|
26
|
+
# genome-global string, so the dispatch lives here rather than in the spec: when
|
|
27
|
+
# this unit owns a hook and we are not already running inside it (recursion guard
|
|
28
|
+
# set on the way in), defer to the hook. Units without a hook — and every caller
|
|
29
|
+
# that passes an id with no matching file — fall through byte-identical (F1).
|
|
30
|
+
_here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
31
|
+
case "$unit_id" in
|
|
32
|
+
scenario-*)
|
|
33
|
+
_hook="$_here/run-scenario-${unit_id#scenario-}.sh"
|
|
34
|
+
if [ -f "$_hook" ] && [ -z "${ABATHUR_HOOK_INNER:-}" ]; then
|
|
35
|
+
exec env ABATHUR_HOOK_INNER=1 bash "$_hook" "$@"
|
|
36
|
+
fi
|
|
37
|
+
;;
|
|
38
|
+
esac
|
|
23
39
|
[ -f "$scenario_file" ] || { echo "run-scenario: missing scenario file $scenario_file" >&2; exit 2; }
|
|
24
40
|
[ -n "${ABATHUR_TRANSCRIPT:-}" ] || { echo "run-scenario: ABATHUR_TRANSCRIPT not set" >&2; exit 2; }
|
|
25
41
|
key="${ABATHUR_WIKI_KEY_FILE:-}"
|
|
@@ -57,7 +73,14 @@ model_args=()
|
|
|
57
73
|
if [ -n "${ABATHUR_AGENT_MODEL:-}" ]; then
|
|
58
74
|
model_args=(--model "$ABATHUR_AGENT_MODEL")
|
|
59
75
|
fi
|
|
60
|
-
"$bin" run --command historian --auto --format json "${model_args[@]}" --message "$brief" >"$ABATHUR_TRANSCRIPT" 2>/dev/null || status=$?
|
|
76
|
+
"$bin" run --command historian --auto --format json "${model_args[@]}" --message "$brief" >"${ABATHUR_TRANSCRIPT}.raw" 2>/dev/null || status=$?
|
|
77
|
+
# Campaign-1 channel fix (task-07-launch-blockers.md): plugin startup banners print to
|
|
78
|
+
# the agent's stdout and contaminate the captured JSONL. ONLY the known
|
|
79
|
+
# `[persistence-watchdog]` line is stripped into the grader-facing transcript —
|
|
80
|
+
# unknown non-JSON lines SURVIVE so the grader's corruption fail-closed stays
|
|
81
|
+
# honest — and a clean stream passes through byte-identical (F1 invariant).
|
|
82
|
+
# The verbatim capture remains at ${ABATHUR_TRANSCRIPT}.raw for audit.
|
|
83
|
+
LC_ALL=C grep -v '^\[persistence-watchdog\]' "${ABATHUR_TRANSCRIPT}.raw" >"$ABATHUR_TRANSCRIPT" || true
|
|
61
84
|
python3 - "$ABATHUR_TRANSCRIPT" "$unit_id" "$status" <<'PY'
|
|
62
85
|
import json, sys
|
|
63
86
|
path, unit, status = sys.argv[1], sys.argv[2], int(sys.argv[3])
|
package/package.json
CHANGED
package/plugin/abathur.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// abathur-opencode-plugin v0.2.
|
|
1
|
+
// abathur-opencode-plugin v0.2.6
|
|
2
2
|
// Official opencode plugin adapter for the abathur evolution harness.
|
|
3
3
|
// Registers ONE agent tool, `abathur`, that shells out to the abathur CLI —
|
|
4
4
|
// argv-only (node:child_process execFile, never a shell), top-level commands
|