Navigácia
ELOWEN · Dokumentácia

Posledná aktualizácia: 20. októbra 2026

Prechádzať dokumentáciu · web implementation

Tento článok zatiaľ nie je preložený. Je dostupný v angličtine.

Developer reference

web implementation

index.mjs owns transport, URL validation, redirects, response body limits, cache coalescing, waiters, inference prompts and result metadata. Registration binds lib/convert.mjs through ctx.host.computation with inlineSmallInputs, which runs a body inline only within the 512-byte combined-input bound, so a page body above it converts in the forked worker. Core owns the exact-string file transport, local/worker placement, child lifecycle and cleanup in both daemon and runner.

lib/convert.mjs owns the single HTML converter instance, ignored tags, safe link/image destinations, conversion fallback and the existing post-conversion truncation marker. It consumes the complete received body before truncation, including a long ignored head or nav. The original 100,000-character bound is defined once in lib/limits.mjs and also used when building the inference prompt. Non-HTML text uses the same existing post-conversion bound.

The 20-second deadline and shared request controller apply only to transport and receiving the body. Once the body is complete, conversion is independent of that signal. A waiter may stop waiting, but even the last waiter leaving does not cancel an already started conversion. The completed result still fills the existing 15-minute cache. Process lifecycle stop cancels the bound computation through the core service list. Worker errors reject without a synchronous fallback. No computation timeout, HTML pre-truncation, output cap or new provider behavior is added.

Golden tests in tests/plugins/webFetchWorker.test.ts and tests/plugins/computationGolden.test.ts compare the exact original Markdown and inference prompt for small and large bodies, both placement sides, ignored prefixes, malformed entities, safe/unsafe URLs, tables and plain text. They also cover cache reuse, approved-host metadata, transport deadline during conversion and all waiters aborting. The converter-failure fallback is characterized on the local branch.