Repository navigation
feat(tool): add MarkkitTool LLM agent tool (Everruns toolkit contract) - #19
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.
2 tasks done
chaliy
added a commit
that referenced
this pull request
Oct 26, 2026
chaliy
added a commit
that referenced
this pull request
Oct 26, 2026
2 tasks done
chaliy
added a commit
that referenced
this pull request
Oct 27, 2026
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. Untracks pkg/ build output committed in #19.
2 tasks done
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 opt-in
toolfeature exposesmarkkit::tool::MarkkitTool, an LLM agent tool with the same shape as bashkit'stoolmodule (Everruns toolkit-library contract):MarkkitToolBuilder→MarkkitTool(metadata, schemas) → single-useToolExecution→ToolOutput.locale(en-US/uk-UA),config(MarkkitBuilder),allow_url,max_output_chars(default 100 000);build_tool_definition()(OpenAI JSON),build_service()(tower::Service),build_input_schema()/build_output_schema().url,html,content_base64(+file_name/content_typehints), optionalmax_chars.{markdown, title, format, warnings, truncated}; metadata carries stats and length.UserFacing(safe for the model, localized prefix); I/O isInternal.Markkit::extract_url_document(URL extraction with format/title/warnings/stats);extract_urlnow delegates to it.integrations/tool-contract.md; tool args added to the threat-model attack surface; exampleexamples/agent_tool.rsruns in CI andjust examples.Feature is off by default (unlike bashkit) so plain library users don't pull
tower.Why
Roadmap initiative 8: agent tool (MCP server optional, later). Follow-ups: WASM package, Node options parity.
Before / After
Before: no tool layer; hosts hand-write schemas and wrappers.
After (
cargo run -p markkit --features tool --example agent_tool):Risk
extract_urlrefactor keeps the same hint (response content type).urlgoes through the existing SSRF guard (tested via the tool) and can be disabled; output capped.Checklist
tool::tests: metadata/locale, schema gating, sources, truncation, validation negatives, SSRF, error mapping, stream, service)