Add fetch MCP server with proxy routing, challenge solving and failure reports
ci / static (push) Failing after 27s
ci / test-3.12 (push) Skipped
ci / test-3.13 (push) Skipped
ci / image (push) Skipped
ci / smoke (push) Skipped
ci / publish (push) Skipped

Live reads go through an operator proxy pool (round-robin over the newest 100
entries, cooling on connect failures, no direct fallback); stored clearances are
replayed only on the exit that earned them. Identity, clearance, solver and
Turnstile rungs escalate automatically. fetch_pages reads up to 12 URLs four at
a time with per-item isolation. report/reports/reports_update keep a durable
queue of unreadable pages for the operator.

Ships a pinned multi-stage image (non-root 10001, data in /data), an ordered CI
with static gates, tests on 3.12 and 3.13 at 85% coverage, an offline image
smoke, and sha/latest publishing gated on main.
This commit is contained in:
omar committed 2026-11-28 19:29:46 +03:00
commit 5d36fddd30
35 files changed
+7616

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
"""Fail if a shipped file contains non-ASCII bytes."""
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
FILES = sorted([*ROOT.glob("*.py"), *ROOT.glob("tests/*.py"), ROOT / "Dockerfile"])
bad: list[str] = []
for path in FILES:
if not path.exists():
continue
for number, line in enumerate(path.read_bytes().splitlines(), 1):
if any(byte > 0x7F for byte in line):
bad.append(f"{path.relative_to(ROOT)}:{number}")
print("\n".join(bad) if bad else "ascii ok")
sys.exit(1 if bad else 0)
+42
View File
@@ -0,0 +1,42 @@
"""Drive a built image over stdio: initialize, list tools, one safe call, EOF.
Only the standard library is used, so it runs outside the project venv.
Prints the JSON-RPC traffic to stdout for the CI log; asserts exit cleanliness
in the caller, not here.
"""
import json
import sys
CALL = {
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {"name": "reports", "arguments": {"status": "open"}},
}
MESSAGES = [
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"capabilities": {},
"clientInfo": {"name": "ci-smoke", "version": "1"},
},
},
{"jsonrpc": "2.0", "method": "notifications/initialized"},
{"jsonrpc": "2.0", "id": 2, "method": "tools/list"},
CALL,
]
def main() -> int:
for message in MESSAGES:
sys.stdout.write(json.dumps(message) + "\n")
sys.stdout.flush()
return 0
if __name__ == "__main__":
raise SystemExit(main())