blob: a0539ce5689a4cab3091226f7eefcc54d0976942 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# panto-web
The `web` extension for [pantograph](https://github.com/travisp/pantograph)'s
`panto` CLI, backed by a persistent [Lightpanda](https://lightpanda.io/) MCP
subprocess.
## Tools
- **`web.fetch`** — renders a URL in Lightpanda and returns its DOM-derived
CommonMark, including JavaScript-rendered content.
- **`web.search`** — searches through Exa's keyless MCP HTTP endpoint by
default. If `EXA_API_KEY` is set, it uses Exa's REST Search API instead.
Tool output is capped at 100 KB.
## Requirements
Install `lightpanda` and ensure it is on `PATH`. The extension does not install
or fall back to another browser. See [Lightpanda installation](https://lightpanda.io/docs/run-locally/installation/one-liner),
or install the nightly with Lightpanda's Homebrew tap:
```sh
brew tap lightpanda-io/browser
brew install lightpanda
```
An `EXA_API_KEY` is optional. When set, `web.search` uses the authenticated
Exa REST API instead of the rate-limited keyless endpoint:
```sh
export EXA_API_KEY=...
```
## Install
Via the rock (once published):
```toml
[extensions]
rocks = ["panto-web"]
```
Or as a local checkout:
```toml
[extensions]
paths = ["/path/to/panto-web"]
```
The extension can be disabled with the usual policy globs, e.g.
`deny = ["web"]`.
## Development
The self-check requires panto's embedded Lua and `luv`, but does not start
Lightpanda or access the network:
```sh
panto lua _selfcheck.lua
```
The source lives under `panto-web/` so `require` works identically installed
and from a checkout; `_selfcheck.lua` is `_`-prefixed so panto's directory
scan skips it.
|