{"slug": "show-hn-lhic-the-execution-layer-that-gets-safer-and-smarter-with-every-run", "title": "Show HN: LHIC-The execution layer that gets safer and smarter with every run", "summary": "LHIC, a deterministic browser automation runtime, executes routine workflows locally without LLM calls, using DOM-based selectors and a Verifier module for objective validation. It prioritizes safety with PII masking, Ed25519-signed human approval for high-risk actions, and persistent skill memory via SQLite, aiming to reduce latency and costs while improving reliability over successive runs.", "body_md": "基於本地優先與語意控制的瀏覽器操作運行時。日常已知的工作流自動化執行無須呼叫 LLM 也不依賴圖像畫面，提供毫秒級響應、客觀驗證證據與嚴格的安全防護。\n\nLHIC 的核心設計理念是「確定性與安全性」，將瀏覽器操作轉變為客觀可驗證的自動化程序。\n\n對於置信度高（≥ 0.8）且為低風險的已知工作流，LHIC 直接呼叫本地預測與語意技能進行執行，徹底消除大模型的延遲與 Token 費用。\n\n優先使用 DOM、ARIA 輔助角色、標籤 (label)、佔位符 (placeholder) 與包裹關係進行精準定位，大幅降低網頁排版異動帶來的腳本崩潰機率。\n\n每項操作的成功不靠模型猜測，而是由驗證器模組 (Verifier) 直接收集 DOM、URL、網路請求與檔案下載等客觀數據，作為執行通過的硬性指標。\n\n執行成功後，選擇器與故障修復歷史將持久化至本地 SQLite。下次執行同類網頁時，系統能主動進行選擇器修補與策略優化。\n\n自動在日誌中遮蔽敏感 PII (密碼、Cookie、Email、Token、手機)。高風險動作在生產環境中需經過由 Ed25519 數位簽章驗證的人類審批流。\n\n提供標準 Model Context Protocol (MCP) 伺服器，對外曝露標準 API (Start, Observe, Act, Close)，完美對接外部 AI 代理 (例如 Antigravity)。\n\nLHIC 基於模組化 TypeScript 單一儲存庫 (Monorepo) 構建，透過雙路徑路由決策引擎實現安全高效的瀏覽器操作。\n\n點擊下方資料夾節點可查看該套件/應用程式的功能說明與職責。\n\n從環境建置到生產部署，逐步引導您掌握 LHIC 的強大安全自動化能力。\n\n需要 Node.js 24 以上版本；不必全域安裝 LHIC。\n\n```\n# 不需全域安裝\nnpx @pinyencheng/lhic start\n```\n\n安裝運行時所需的 Playwright Chromium 瀏覽器驅動。\n\n```\nnpx playwright@1.61.1 install chromium\n```\n\n確認瀏覽器自動化與桌面控制的必要條件皆已就緒。\n\n```\nnpx @pinyencheng/lhic preflight\nnpx @pinyencheng/lhic global doctor\n```\n\n透過編譯好的 CLI，傳入語意動作 JSON 檔案執行。\n\n```\n# 執行特定 semantic action 任務\nnpx @pinyencheng/lhic run action action.json\n```\n\n檢視追蹤日誌並驗證敏感資訊 (密碼、Cookie) 是否已被完全遮蔽。\n\n```\n# 檢查指定追蹤日誌的健全度與風險遮蔽狀況\nnpx @pinyencheng/lhic trace inspect path/to/trace.jsonl\n```\n\n執行本地語意抗變性 (resilience) 的消融模擬評估。\n\n```\n# 執行 100 次以指定 Seed (20260715) 生成的表單填寫消融測試\nnpx @pinyencheng/lhic bench simulate resilience 100 20260715\n```\n\nAI harness 與 Chromium 必須在同一台電腦執行。MCP server 尚需由此 checkout 建置一次；後續的 CLI 使用與驗證則透過 npx 執行。\n\n```\nnpm ci\nnpm run build\nnpx playwright@1.61.1 install chromium\nnpx @pinyencheng/lhic preflight\n```\n\n每個 MCP server process 管理一個新的 Chromium 工作階段，並依到達順序序列化操作。請讓 harness 直接啟動 `node`\n\n；不要使用 `npm run`\n\n，避免 Lifecycle 輸出污染 MCP 的 JSON stdio 通訊協定。\n\n```\n# Every harness points at this local, compiled server.\ncommand = \"node\"\nargs = [\"/absolute/path/to/ComputerIntent/apps/mcp-server/dist/index.js\"]\ncwd = \"/absolute/path/to/ComputerIntent\"\n```\n\n在專案根目錄執行以下命令，將 LHIC 儲存為 OpenClaw 管理的本機 MCP server，然後以 live probe 確認它能啟動並列出工具。\n\n```\nopenclaw mcp add lhic-computer-use --command node --arg \"$PWD/apps/mcp-server/dist/index.js\" --cwd \"$PWD\"\n\nopenclaw mcp doctor lhic-computer-use --probe\n```\n\n在 `~/.hermes/config.yaml`\n\n的 `mcp_servers`\n\n中新增 LHIC。保留單一序列化工作階段設定，並使用本機 SQLite 路徑保存經遮蔽的技能與選擇器記憶。\n\n```\n# ~/.hermes/config.yaml\nmcp_servers:\n  lhic_computer_use:\n    command: node\n    args:\n      - /absolute/path/to/ComputerIntent/apps/mcp-server/dist/index.js\n    env:\n      LHIC_MEMORY_DATABASE: /absolute/path/to/ComputerIntent/.lhic/skills.sqlite\n    timeout: 45\n    connect_timeout: 20\n    supports_parallel_tool_calls: false\n```\n\n此專案已包含 Antigravity 外掛。驗證外掛後，產生可供審閱的設定片段，貼入 harness 設定並在重啟後用 `/mcp`\n\n確認連線。\n\n```\nagy plugin validate .agents/plugins/lhic-computer-use\nnpx @pinyencheng/lhic mcp config antigravity \"$PWD\"\n\n# Review the printed JSON, add it to Antigravity, restart, then run /mcp.\n```\n\n請 harness 依序使用以下工具。每個動作後都要檢查 `result.success`\n\n、驗證證據與回傳狀態；高風險或未知風險動作仍需要人類核准。\n\n```\nlhic_runtime_status\nlhic_browser_start\nlhic_browser_observe\nlhic_browser_act  # exactly one: navigate, click, fill, select, press, or wait\nlhic_browser_observe\nlhic_browser_close\n```\n\n切換至生產模式，強制要求 HTTPS 域名白名單、非私有網路目標、以及無明文 Credential 的網址。\n\n```\n# 驗證生產環境配置與預檢\nLHIC_ENV=production \\\nLHIC_ALLOWED_ORIGINS=https://app.example.com \\\nnpx @pinyencheng/lhic preflight\n```\n\n以低權限 (非 root 用戶 `lhic`\n\n) 打包 Chromium 與 CLI，並禁止掛載敏感的個人設定檔目錄。\n\n```\n# 建立容器並以生產配置預檢\ndocker build --tag lhic:local .\ndocker run --rm \\\n  -e LHIC_ALLOWED_ORIGINS=https://app.example.com \\\n  -v lhic-traces:/var/lib/lhic/traces \\\n  lhic:local preflight\n```\n\n在生產模式下，任何高風險動作必須帶有第三方簽章授權，經 Ed25519 金鑰比對無誤後才允許在 Fast Path 執行。\n\n```\n# 傳入動作檔與人類簽章檔案進行嚴格驗簽執行\nLHIC_ENV=production \\\nLHIC_ALLOWED_ORIGINS=https://app.example.com \\\nLHIC_APPROVAL_PUBLIC_KEY=\"$(cat approval-authority-public.pem)\" \\\nnpx @pinyencheng/lhic run action action.json approval.json\n```\n\nLHIC 通過嚴密的本地回歸指標套件，確保程式碼修改不影響系統的高可靠性與安全性。\n\n由 `fill_form`\n\n, `download_file`\n\n, `login`\n\n, `search`\n\n, `test_web_flow`\n\n各 10 組本地網頁所組成的回歸煙霧測試 (Smoke Suite)。下面為系統設定的硬性驗收門檻：\n\n模擬在 5 種不同 UI 排版與命名變體下，表單填寫動作的成功率對比。此實驗是客觀反映語意定位器抗變性價值的核心指標。\n\nLHIC 放棄了高成本、低安全性的「截圖-VLM-滑鼠座標」循環，改用精準的 DOM API 與安全邊界。\n\n| 架構屬性 | 傳統 VLM/像素定位方案 (如 Anthropic Computer Use) | LHIC (Local Human Intent Controller) |\n|---|---|---|\n基本操作迴圈 |\nVLM 模型解讀截圖 → 計算像素座標 → 模擬滑鼠點擊 (極慢，成本高) | 直接調用 CDP / Playwright DOM 與 ARIA 語意 API。優先走無模型 Fast Path |\n定位精準度與抗變性 |\n依賴視覺判讀，受解析度、縮放、滾動影響，易點錯座標造成不可預測後果 | 標籤 (label)、角色 (role) 與本地 SQLite 歷史反饋修補定位。排版微調完全不受影響 |\n安全性與 PII 防護 |\n日誌與 Token 中可能附帶敏感個資與截圖明文，無有效過濾機制 | 原生 Regex 敏感資訊脫敏、HTTPS 白名單、本地 JSONL 不保留敏感輸入 |\n高風險防堵機制 |\n大模型一旦「幻覺」容易自行點擊危險按鈕 (如確認支付、刪除帳號) | 高風險與自訂操作強制阻斷，必須取得由第三方簽發的 Ed25519 簽章憑證才可放行 |\n執行成功驗證 |\n大模型自己預測「我好像完成了」 (無客觀依據，False-Positive 高) | Verifier 硬性取得 DOM 終端狀態、網路監聽封包或下載成功資訊 |\n運算資源與成本 |\n每一次滑動與動作均需多次呼叫 VLM API，每步驟數美分，延遲數秒 | 本地預測 + Fast Path 毫秒級極速回應，0 大模型 API Token 開銷 |\n\nLHIC 並非泛用的網頁「大模型探索代理」，而是鎖定在**企業級高頻率、需要高可靠度與隱私保護的已知操作任務**。\n當前許多產品追求「完全自主探索」，往往導致昂貴的賬單與隨機性的任務失敗。LHIC 的雙軌路由策略 (Fast/Slow Path) 將企業自動化的邊際成本降至接近零。\n\n我們絕不宣稱無客觀證據的 SOTA 指標。為保障指標真實性，專案配置了 `lhic bench validate-evidence`\n\n驗證指令。\n唯有在 BrowserGym/AgentLab 整合套件下跑完 WorkArena 完整資料集、提交不加任何修改的映像檔 Hash，並取得獨立第三方的再現，才被允許發布市場基準領先宣稱。", "url": "https://wpnews.pro/news/show-hn-lhic-the-execution-layer-that-gets-safer-and-smarter-with-every-run", "canonical_source": "https://lhic-docs.pages.dev/", "published_at": "2026-07-17 06:21:59+00:00", "updated_at": "2026-07-17 06:51:13.904153+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-infrastructure"], "entities": ["LHIC", "Playwright", "Chromium", "MCP", "Antigravity", "Ed25519", "SQLite", "TypeScript"], "alternates": {"html": "https://wpnews.pro/news/show-hn-lhic-the-execution-layer-that-gets-safer-and-smarter-with-every-run", "markdown": "https://wpnews.pro/news/show-hn-lhic-the-execution-layer-that-gets-safer-and-smarter-with-every-run.md", "text": "https://wpnews.pro/news/show-hn-lhic-the-execution-layer-that-gets-safer-and-smarter-with-every-run.txt", "jsonld": "https://wpnews.pro/news/show-hn-lhic-the-execution-layer-that-gets-safer-and-smarter-with-every-run.jsonld"}}