9 Commits
Author SHA1 Message Date
plean 34a64ec9c6 served_ms is request-level (includes queue wait); with-open for image reads
- served_ms measured from request entry, not inside the worker thread:
  a client that queued 8 s behind a parse no longer sees served_ms: 12
- image file handle bound in a with block (no fd held to GC)
2026-11-18 03:03:53 +00:00
plean 46ae7046ea Surface tool failures; timeout discipline; call logging; cache-hit honesty
1. mcp shim: anticipate OSError/RequestException/JSON errors and raise
   ToolError with 'Type: message' - the SDK strips ALL text from bare
   exceptions ('Error executing tool omniparse' with zero detail)
2. shim HTTP timeout 300s -> 100s, below the harness's 120s: harness
   aborts are detailless, ours say why (documented)
3. shim file logging to ~/.cache/omniparse/mcp.log (harnesses discard
   stdio stderr): every call's args/status/duration + full tracebacks
4. warm-up 503 sends Retry-After: 10 (429 already did)
5. cache hits no longer replay original timings as live: timings become
   {served_from_cache, original_parse}, fresh served_ms on every response
6. token filename canonicalized on omniparse_token (deployed file real,
   not a symlink; harness config updated)
7. GET / points at /healthz and /docs instead of bare 404
2026-11-18 03:00:17 +00:00
plean 5bc1815ebc setup.sh: verify weight downloads (size + presence guards); download path exercised (206 range fetches, magic bytes, PR-rev URL, totals 1.08 GB / 281 MB) 2026-11-18 02:38:41 +00:00
plean 392fa6326f setup.sh: robust interpreter selection (--python flag, 3.10-3.12 wheel-range guard)
Clean-venv build executed end-to-end on Pascal hardware: slimmed
requirements.txt boots the full pipeline; torch 2.6.0+cu124, sm_61 detected.
2026-11-18 02:37:57 +00:00
plean 61a0f353cd Fresh-machine hardening from review
- util: drop dead openai/json/sys/requests/PIL extras (openai import would
  ImportError before engine load); ultralytics fallback path now raises
  (AGPL isolation - only MIT icon_detect_v3 ships)
- requirements: default path only; paddle + ultralytics moved to README
  optional section
- setup.sh: venv fallback for distros without ensurepip; --skip-weights
  verified
- start.sh: bind 127.0.0.1 by default (LAN = explicit opt-in)
- docs: absolute-path !cat examples, HF startup/airgap notes, token
  placement, security defaults
2026-11-18 02:34:13 +00:00
plean 933f33e70a start.sh: launch uvicorn as 'python -m uvicorn' (module form works with any interpreter; PATH-based lookup failed without .venv) 2026-11-18 02:32:40 +00:00
plean e366b80ff7 Do not ship the local weights symlink (breaks fresh clones: broken symlink blocks setup.sh mkdir) 2026-11-18 02:31:48 +00:00
plean aacec82c85 setup.sh: skip download when weights already present 2026-11-18 02:30:56 +00:00
plean 2a4b1101e6 omniparse-mcp: standalone OmniParser V2 parsing service + MCP shim
Self-contained: vendored util/ (CC BY 4.0, fixes noted in NOTICE), portable
setup.sh (venv + weights + Pascal lane), start.sh with real-parse readiness
gate, FastAPI service (bearer, serial GPU queue, LRU cache, OOM->503), MCP
stdio shim (MCPServer 2.x, token strip), hardware-honest README.
2026-11-18 02:29:08 +00:00