- plugins/junction: evaluates the X-Junction-Mcp header and /status; the sidebar widget, the "junction" status segment, junction_status and /junction show uptime, MCP-server health, queue and request counts. The url/header come from the plugin block, the mcp junction server or SPLINTER_JUNCTION_URL/TOKEN; the key is never printed. - theme: two flat themes. light is a white page with black text, dark the same inverted; chat, sidebar and input share the page, the status line is the one separate surface. Each CDE palette keeps its own rules. - curses: the sidebar uses the theme's own text on its own background (white/black) instead of white on a darkened surface; the one column between chat and sidebar is painted, so a white theme has no black seam. - focus: the goal goes into the first prompt (config, resume, planner), and every goal-carrying text asks the model to end with GOAL_COMPLETE. The marker is read from the conversation and the session log and recorded as goal_state=succeeded in the session meta; /goal and the sidebar say [done], reminders stop, a new goal opens a new one. - tests: test_junction (fake server, header identity, no colon in widget continuation lines, no key in the output), test_focus (announcement, completion in the compactor and from the tick, persisted state), test_theme (flat themes, list order). make check: all tests passed.
38 lines
828 B
Bash
38 lines
828 B
Bash
#!/bin/sh
|
|
# tests/test_junction.sh -- the junction plugin against a stand-in server.
|
|
#
|
|
# The C test needs a live HTTP endpoint; this starts tests/fake_junction.py on a
|
|
# free-ish port, waits for it, and hands the port to the test. Nothing leaves
|
|
# the machine.
|
|
set -e
|
|
cd "$(dirname "$0")/.."
|
|
|
|
port=${JUNCTION_TEST_PORT:-18099}
|
|
python3 tests/fake_junction.py "$port" &
|
|
pid=$!
|
|
trap 'kill $pid 2>/dev/null || true' EXIT INT TERM
|
|
|
|
# wait for the port, not for a fixed sleep: a loaded machine starts python late
|
|
i=0
|
|
while [ $i -lt 50 ]; do
|
|
if python3 - "$port" <<'EOF'
|
|
import socket, sys
|
|
s = socket.socket()
|
|
s.settimeout(0.2)
|
|
try:
|
|
s.connect(("127.0.0.1", int(sys.argv[1])))
|
|
sys.exit(0)
|
|
except OSError:
|
|
sys.exit(1)
|
|
finally:
|
|
s.close()
|
|
EOF
|
|
then
|
|
break
|
|
fi
|
|
i=$((i + 1))
|
|
sleep 0.1
|
|
done
|
|
|
|
./tests/test_junction "$port"
|