Repository navigation
feat(wasm): add @everruns/markkit-wasm browser and edge package - #32
Merged
Merged
Conversation
Opt-in `tool` feature adds markkit::tool: MarkkitToolBuilder -> MarkkitTool -> single-use ToolExecution, mirroring bashkit's tool module. One call converts a url, html or base64 document to Markdown; args validated before execution, base64 bounded before decode, URL via the SSRF guard, output capped by max_output_chars. Adds Markkit::extract_url_document.
wasm-bindgen build of markkit (html, docx, spreadsheet, tool) for wasm32-unknown-unknown: single-threaded, no COOP/COEP, no URL fetching. Markkit class with validated camelCase options plus MarkkitTool. Node tests, CI job gating Check, and an OIDC npm publisher.
chaliy
added a commit
that referenced
this pull request
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Михайло · project thread
What changed
New npm package
@everruns/markkit-wasm(crates/markkit-wasm), modeled on bashkit-wasm: Markkit compiled towasm32-unknown-unknownviawasm-bindgen --target web.SharedArrayBuffer, no COOP/COEP headers. Runs in browsers (incl. iframes), Cloudflare/Vercel/Deno edge, Node, Deno, Bun.html,docx,spreadsheet,tool. No URL fetching (reqwest needs sockets; host fetches and keeps network policy).initMarkkit(),new Markkit(options)withextractHtml,extractDocument(markdown, title, format, warnings, stats, camelCasemetadata),extractBytes;new MarkkitTool(options)withtoolDefinition(), schemas,systemPrompt(),execute(args)(rejections carryuserFacing).invalid options(routed throughserde_json::Value, since serde-wasm-bindgen only reads named fields and would silently ignore typos).index.d.ts;scripts/build.sh(wasm-release profile,opt-level = "z", optionalwasm-opt);scripts/install-wasm-bindgen.shpins the CLI to Cargo.lock.wasmjob (corecargo checkfor wasm32, build,node --test, npm archive contents) gatingCheck.publish-wasm.yml: workflow_dispatch, dry run by default, npm trusted publishing (OIDC).runtimes/wasm-package.md; release process bumps both npmpackage.jsonversions (a test pins wasmpackage.jsonto the crate version).crates/markkit-wasm/pkg/build output that slipped into feat(tool): add MarkkitTool LLM agent tool (Everruns toolkit contract) #19's merge commit;.gitignorenow covers it.Why
Roadmap: WASM package like bashkit-wasm, so markkit (and its agent tool) runs where a native addon can't load.
Before / After
Before: no browser/edge option;
@everruns/markkitis a Linux x64 native addon only.After:
Headless Chromium smoke (plain HTTP server, no special headers):
initMarkkit()+extractHtml("<h1>Browser</h1>")+MarkkitTool.execute({html})→"# Browser\n|tool\n".Bundle: ~1.4 MB unoptimized
.wasm(beforewasm-opt).Risk
panic = "abort"a parser panic would trap the instance; S9 says parsers return errors.@everruns/markkit-wasm.Checklist