SIGN IN SIGN UP

merge: resolve conflicts with origin/main; retain escapeGoalText fix and new helper tests

main (PR #3) already implemented noProgressTurnsBeforePause, maxRecentMessages,
the grace window, CI matrix, and extensive new tests. This merge keeps main's
version for all those areas and contributes two remaining additions:

- escapeGoalText: broadened to escape all XML closing tags (replaceAll "</" → "<\/")
  so user-supplied goal text cannot break any structural tag in buildContinueMessage;
  main's version still only escaped </goal_objective>
- tests: 7 new unit tests for outputTokensForMessage, budgetWrapupNeeded, getSessionID,
  stopReason, normalizeOptions boundary inputs (zero/negative/NaN/null, budgetWrapupRatio
  at 0 and 1), and escapeGoalText covering all structural tags

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
W
Willy committed
7940edde03824103ddd45c878dfa1125ab7cf2cc