26 lines
7.4 KiB
YAML
26 lines
7.4 KiB
YAML
name: webgraft
|
|
title: WebGraft
|
|
repo: https://github.com/ElSerda/webgraft
|
|
sha: "851f39ddc80c93170ebda92c08ca26d2e0cab0da"
|
|
description: "Local page and document reading for web_extract, and the pages opened for the answer, as clickable sources. Asks for approval before risky tools once a conversation has read the web, and before Hermes's keyless rescue sends a page or a search to an outside service. What it downloads, runs and stores: see 'What it does, for review' in the README. Disclosure — downloads the URLs web_extract is asked to read, from this machine with Hermes's own User-Agent (HermesAgent; the browser sends the same), and each site's /llms.txt once per hour (on by default, setting llms_txt), through Hermes's SSRF-safe client (private, loopback, link-local and metadata addresses refused on every redirect hop; with an HTTP(S) proxy configured, where Hermes's guard leaves hops to the proxy, webgraft checks each redirect target itself; results report the final URL so Hermes re-checks it; before the browser opens a page, webgraft resolves its host, checks every address and pins Chromium to that address, a host with any non-public address gets no browser, and a browser view that ends on a non-public address or on another site is dropped; requests made by the page's own scripts and assets in the browser are not checked); `setup` also checks the SearXNG URL it is given and reads two test pages on iana.org; `setup` optionally creates an isolated `hermes pm` environment with Crawl4AI, which drives Hermes's own Chromium (`hermes pm install chromium` if missing; the plugin downloads no browser), which opens a page only when its download has no text, or every page the site served with setting `browser: always`; each Crawl4AI read is a child process (at most 3 at once per Hermes process, 60 s cap, stopped with its Chromium on timeout or when Hermes cancels the call) that starts that Chromium headless with a DevTools port on 127.0.0.1 and a temporary profile, checks TLS certificates, runs the page's scripts and loads its assets, keeps the browser profile and Crawl4AI's log and cache in a temporary folder that webgraft creates and removes (its own folders left by an earlier, interrupted run are removed after an hour); each document is converted by anydoc in a child process (60 s cap, stopped if Hermes cancels the call); `setup` installs Hermes's `doc-extract` extra if missing, and its `ddgs` extra when DuckDuckGo search is chosen; `setup` optionally creates an OCR environment (RapidOCR, onnxruntime, pypdfium2) whose first run downloads about 32 MB of OCR models from RapidOCR's official modelscope.cn repository, checked by SHA-256, and each scanned PDF is then read in a child process (100 s cap, stopped if Hermes cancels the call); appends a short note (about 110 tokens) to each user message (setting `remind`); once a conversation has read web content (web_search, web_extract, x_search, browser tools, MCP tools, hosted connector tools, pages attached with @url:, vision_analyze / video_analyze on a URL, a terminal command or execute_code script holding an http(s) URL, tools a script runs, a subagent that read the web), sends every tool that is not read-only (terminal, code, browser, file writes, memory, messages, subagents, session_search, unknown tools (a tool_call bridge call is guarded as the tool it runs, and one Hermes cannot resolve is left to Hermes's own error), read_file / search_files outside the folders where Hermes keeps fetched pages, and vision_analyze / video_analyze on a local file) to Hermes's own approval prompt through the pre_tool_call approve directive, refused where nobody can answer such as -Q or cron (setting `tool_guard`: ask by default, block, off), because a web page can hold instructions aimed at the assistant; in a Kanban worker (HERMES_KANBAN_TASK, where nobody can answer), these stay free: the board reads, the tools that hand its own card on, write_file / patch / read_file / search_files inside the card's workspace (HERMES_KANBAN_WORKSPACE; a relative path, or a blank search path, is pinned to that workspace through the pre_tool_call modify directive), read_file of the files its parent cards handed on (artifacts), and a
|
|
terminal command whose words all stay in that workspace (file and text utilities, or a program with a version flag alone; no URL, expansion, heredoc or script run), whose workdir webgraft sets to that workspace through the pre_tool_call modify directive, Hermes's own command checks running on it as usual; a worker whose own card, a parent card or a recent card listed in its first message was worked after a web read starts guarded; a tool call that cannot be tied to a conversation is guarded as soon as any conversation in the process has read the web; when webgraft cannot read any page of a call, it keeps those pages from Hermes's keyless rescue (web.keyless_rescue, which would send their URLs to Exa, Parallel, Firecrawl or Keenable), and asking for such a page again goes to Hermes's approval prompt first; after a search that the rescue served because the search backend failed, the next searches go to the approval prompt for up to 10 minutes, though that first rescued search has already gone out (setting `keyless_rescue`: ask by default, block, off; under --yolo or approvals off Hermes approves by itself); keeps the ids (no content) of guarded conversations, at most 1000, in plugin-data/webgraft/web_sessions.json, so the guard holds after a restart and after Hermes compresses the history, and the Kanban cards worked after a web read as empty files named after their board and card id in plugin-data/webgraft/kanban_cards (at most 2000); a continuation session or subagent inherits its parent's mark; `setup` writes web.search_backend, web.extract_backend, skills.auto_load and SEARXNG_URL, recording replaced values and the Chromium path under plugin-data/webgraft; `status` reads the model, fallback, auxiliary, web, TTS and STT settings and SEARXNG_URL to list what can leave the machine, and changes nothing; page-reading child processes get a minimal environment, never Hermes's API keys; `setup` optionally raises web.extract_char_limit (only on a yes; the replaced value is restored by `uninstall`); no page text is kept, only the URLs, titles and failure reasons of recent pages, in memory; setting `tool_guard_kanban` (default true): off lets a worker the Kanban dispatcher starts run its tools without tool_guard's approval prompt, which nobody can answer in a worker — Hermes's own worker rules still apply (execute_code and dangerous commands refused where nobody can answer), an ordinary command or a write outside the card's workspace runs unapproved, and the mark still follows the card (a chat reading the board starts guarded); `setup` offers it (step 7, --kanban-guard / --no-kanban-guard) and writes plugins.entries.webgraft.settings.tool_guard_kanban; an explicit null for a webgraft setting reads as its default (a boolean setting no longer fails open on null); a page webgraft reads itself after an earlier failure keeps its true provenance in the footer (no longer labeled as read by the keyless rescue); no telemetry."
|
|
maintainer: ElSerda
|
|
tier: community
|
|
category: web
|
|
requires_hermes: ">=0.22.6"
|
|
docs_url: https://github.com/ElSerda/webgraft#readme
|
|
version: "0.3.3"
|
|
platforms:
|
|
- linux
|
|
- windows
|
|
capabilities:
|
|
provides_tools: []
|
|
provides_hooks:
|
|
- pre_llm_call
|
|
- pre_tool_call
|
|
- post_tool_call
|
|
- transform_tool_result
|
|
- transform_llm_output
|
|
provides_middleware: []
|
|
requires_env: []
|