peppa/scripts/lib/load-env.sh
Асель 1df550bb86 Add Codex provider, mock agents and end-to-end CJM suite
- runner: provider abstraction (claude | codex); per-run launch.sh keeps
  long argv out of tmux; Codex via notify callback + -c config for rules
  and the peppa MCP server; session env carries DATABASE_URL/PEPPA_HOME
- testkit: mock-claude / mock-codex driven by scenarios — real hooks,
  notify, MCP calls, raw-mode TUI input with bracketed paste, permission
  dialog, usage limits, hangs, crashes, /clear
- 21 CJM tests on an isolated DB, tmux server and state dir (all green)
- fix: watchdog crash/stall alerts showed blank lines instead of the tail
- bins load .env without overriding the caller's env; tmux socket option
- AGENTS.md (was CLAUDE.md) and shared RULES.md: mock-first rule with a
  mock prefix for anything blocked on external dependencies

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 20:09:43 +05:00

12 lines
458 B
Bash

# Sourced by Peppa's bin wrappers: exports .env values without overriding variables that
# are already set, so tests (and the runner's per-session env) can point at another DB.
_peppa_env="${PEPPA_ROOT:?}/.env"
if [ -f "$_peppa_env" ]; then
while IFS= read -r _line || [ -n "$_line" ]; do
case "$_line" in ''|\#*) continue ;; esac
_key="${_line%%=*}"
[ -z "${!_key+x}" ] && export "$_line"
done < "$_peppa_env"
fi
unset _peppa_env _line _key