一键导入
ax-provider-web
Use when modifying web access providers -- proxied HTTP fetch, DNS pinning, taint tagging, text extraction, or web search in src/providers/web/
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when modifying web access providers -- proxied HTTP fetch, DNS pinning, taint tagging, text extraction, or web search in src/providers/web/
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when modifying logging, error handling, or diagnostic messages — logger setup, transports, error diagnosis patterns in src/logger.ts and src/errors.ts
Use when modifying the trusted host process — server orchestration, message routing, IPC handler, request lifecycle, event streaming, file handling, plugin loading, or agent delegation in src/host/
Use when modifying the sandboxed agent process — runner, IPC client, local/IPC tools, tool catalog, prompt building, or identity loading in src/agent/
Use when modifying agent sandbox isolation -- Docker, Apple Container (macOS), or k8s providers in src/providers/sandbox/
Use when modifying IPC protocol between host and agent — schemas, actions, length-prefix framing, or Zod validation in ipc-schemas.ts and ipc-server.ts
AX project architecture and coding skills - use sub-skills for specific subsystems (agent, host, cli, providers, etc.)
| name | ax-provider-web |
| description | Use when modifying web access providers -- proxied HTTP fetch, DNS pinning, taint tagging, text extraction, or web search in src/providers/web/ |
Web functionality is split into three independent operations:
config.providers.web.extract. Pulls cleaned text from web pages.config.providers.web.search. Web search queries.Agents have no direct network access — all web requests route through the host via IPC.
src/providers/web/types.ts)| Type | Key Fields |
|---|---|
FetchRequest | url, method? (GET/HEAD), headers?, timeoutMs? |
FetchResponse | status, headers, body, taint: TaintTag |
ExtractResult | url, content, taint: TaintTag |
SearchResult | title, url, snippet, taint: TaintTag |
WebExtractProvider | extract(url): Promise<ExtractResult> |
WebSearchProvider | search(query, maxResults?): Promise<SearchResult[]> |
Every response carries a TaintTag with trust: 'external'.
providers:
web:
extract: none # or 'tavily'
search: none # or 'tavily' or 'brave'
Two provider categories in the provider map: web_extract and web_search.
| File | Purpose |
|---|---|
src/providers/web/fetch.ts | Direct HTTP fetch with DNS pinning (hardcoded) |
web_extract)| Name | File | Purpose |
|---|---|---|
tavily | src/providers/web/tavily-extract.ts | Tavily Extract API (markdown output) |
none | src/providers/web/none-extract.ts | Disabled stub |
web_search)| Name | File | Purpose |
|---|---|---|
tavily | src/providers/web/tavily-search.ts | Tavily Search API |
brave | src/providers/web/brave-search.ts | Brave Search API |
none | src/providers/web/none-search.ts | Disabled stub |
All registered in src/host/provider-map.ts under web_extract and web_search kinds.
webFetch: { fetch(req: FetchRequest): Promise<FetchResponse> }; // always loaded
webExtract: WebExtractProvider; // from web_extract provider
webSearch: WebSearchProvider; // from web_search provider
| Action | Schema | Handler |
|---|---|---|
web_fetch | WebFetchSchema | Routes to webFetch.fetch() |
web_extract | WebExtractSchema | Routes to webExtract.extract() |
web_search | WebSearchSchema | Routes to webSearch.search() |
The web tool has three variants via type discriminator:
type: "fetch" → web_fetch IPC actiontype: "extract" → web_extract IPC actiontype: "search" → web_search IPC actionfetch.ts)dns/promises.lookup, checks the IP against private ranges (IPv4 + IPv6), then connects to the pinned IP directly. Prevents TOCTOU DNS rebinding.127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16 (cloud metadata), 0.0.0.0/8, ::1, fe80:, fc/fd.timeoutMs.http: and https: allowed.allowedIPs option bypasses private-range blocking for tests.src/providers/web/<name>-extract.ts implementing WebExtractProvider.create(config: Config): Promise<WebExtractProvider>.<name>: '../providers/web/<name>-extract.js' to web_extract in src/host/provider-map.ts.tests/providers/web/<name>-extract.test.ts.src/providers/web/<name>-search.ts implementing WebSearchProvider.create(config: Config): Promise<WebSearchProvider>.<name>: '../providers/web/<name>-search.js' to web_search in src/host/provider-map.ts.tests/providers/web/<name>-search.test.ts.When skills declare requires.env in their frontmatter (e.g., LINEAR_API_KEY), the host builds a CredentialPlaceholderMap at sandbox launch:
requires.env are collected by scanning skill files in agent + user workspaceCredentialProviderax-cred:<hex>) replace real valuesKey files:
src/host/proxy-ca.ts — CA certificate generation and domain cert signingsrc/host/credential-placeholders.ts — Placeholder token managementsrc/host/web-proxy.ts — MITM TLS inspection in handleMITMConnect()src/host/server-completions.ts — Wiring: skill env collection, credential map build, CA trust injectionsrc/host/credential-prompts.ts — Interactive credential prompting registry (request/resolve/cleanup)trust: 'external'. Never strip or skip the taint tag.TAVILY_API_KEY, BRAVE_API_KEY). The fetch provider needs no credentials.create() is async in all web providers.config.providers.web.extract and config.providers.web.search, not config.providers.web as a string.ax-cred: prefix. Never log or expose real credential values — only placeholders should appear in agent-side logs.config.mitm_bypass_domains) is for cert-pinning CLIs only. Most HTTPS traffic should go through MITM for credential injection to work.