Consolidate Odysseus agent harness and tool contracts

This commit is contained in:
pewdiepie-archdaemon
2026-09-17 10:07:40 +00:00
parent 84aa9a91de
commit 218d762427
229 changed files with 28899 additions and 1551 deletions
@@ -0,0 +1,19 @@
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def test_richtext_toolbar_preserves_selection_before_formatting():
source = (ROOT / "static/js/document.js").read_text(encoding="utf-8")
assert "let _savedFormatTextareaSelection = null;" in source
assert "let _savedFormatRichRange = null;" in source
assert "toolbar.addEventListener('pointerdown', (e) =>" in source
assert "_saveFormatSelection(e);" in source
assert "textarea.selectionStart !== textarea.selectionEnd" in source
assert "ta.selectionStart = _savedFormatTextareaSelection.start;" in source
assert "const _selection = window.getSelection?.();" in source
assert "_richFormatRange = _range.cloneRange();" in source
assert "_selection.addRange(_richFormatRange.cloneRange());" in source
assert "collapse the browser range before execCommand runs" in source