heso 0.0.1__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -0,0 +1,207 @@
1
+ Metadata-Version: 2.4
2
+ Name: heso
3
+ Version: 0.0.1
4
+ Classifier: Development Status :: 3 - Alpha
5
+ Classifier: License :: OSI Approved :: MIT License
6
+ Classifier: License :: OSI Approved :: Apache Software License
7
+ Classifier: Operating System :: Microsoft :: Windows
8
+ Classifier: Programming Language :: Rust
9
+ Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
10
+ Classifier: Topic :: Software Development :: Libraries
11
+ License-File: LICENSE-APACHE
12
+ License-File: LICENSE-MIT
13
+ Summary: The agent-native web engine. No Chromium. No Node. One Rust binary.
14
+ Keywords: headless-browser,agent,ai,web-scraping,automation
15
+ Author: Akshay and heso contributors
16
+ License: MIT OR Apache-2.0
17
+ Requires-Python: >=3.8
18
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
19
+ Project-URL: Documentation, https://www.heso.ca/docs
20
+ Project-URL: Homepage, https://www.heso.ca
21
+ Project-URL: Issues, https://github.com/blank3rs/heso/issues
22
+ Project-URL: Repository, https://github.com/blank3rs/heso
23
+
24
+ # heso — The agent-native web engine. No Chromium. No Node. One Rust binary.
25
+
26
+ **Site:** [heso.ca](https://www.heso.ca) · **Docs:** [heso.ca/docs](https://www.heso.ca/docs)
27
+
28
+ It fetches a URL, runs the JavaScript, lets you click, fill forms, search the web, and scrape many pages in parallel — and returns everything as JSON so an agent can use it.
29
+
30
+ ```
31
+ binary 9.2 MB
32
+ cold start ~80 ms (open https://example.com, network included)
33
+ engine only ~35 ms (no network)
34
+ batch ~1.1 s for 8 URLs in parallel
35
+ ```
36
+
37
+ ![heso agent demo](demo/demo.gif)
38
+
39
+ That's a real recording — Claude Code (`claude -p` from the repo root, with the heso skill loaded) discovering the verbs, navigating the page tree, and pulling the live top story off Hacker News. No edits, no replays.
40
+
41
+ ## A note before you read further
42
+
43
+ Most of this codebase was written with help from Claude under one person's direction. The co-author tag is on basically every commit. It moved fast, which means the feature surface ran ahead of real usage. Treat this as working code that needs more eyes on real workloads, not a finished product.
44
+
45
+ ## What it can do
46
+
47
+ **Find and read things.**
48
+
49
+ - `heso search "<query>"` — searches the web (DuckDuckGo + Wikipedia, optional SearXNG). No API key.
50
+ - `heso open <url>` — fetches and returns a page summary: title, headings, actionable elements.
51
+ - `heso read <url>` — fetches, runs JS, returns the full picture: title, visible text, actions, forms, cookies, console output, framework detection. One call.
52
+ - `heso read <url> --complete` — same, but heso loops "fire pending observers + click load-more + wait for DOM to settle" until the page stops changing. For lazy-loaded sites.
53
+ - `heso batch [open|read] <urls...>` — runs many URLs in parallel. Shared cookie jar, JSON-Lines out.
54
+ - `heso wait <url> --selector-exists ".foo"` (also `--text-contains`, `--url-matches`, `--network-idle`, `--time`) — blocks until a condition is true. No polling loop.
55
+
56
+ **Interact with sites.**
57
+
58
+ - `heso click <url> @e7` — click by element ref.
59
+ - `heso click <url> --text "Sign in"` — or by visible text, CSS selector, or aria-label.
60
+ - `heso fill <url> @e3 "hello"` — type into an input.
61
+ - `heso submit <url> @e9` — submit a form.
62
+ - `heso navigate` — change URL within a session.
63
+ - `heso eval-dom <url> "<js>"` — fetch, run scripts, then run your JS against the resulting DOM.
64
+
65
+ **Recover from broken sites.**
66
+
67
+ - `--best-effort` on `open` / `read` / `wait` — exit 0 even when scripts crash. Output includes `partial: true`, `partial_reason: "script_crash" | "wait_timeout" | "fetch_failed" | "parse_error"`, and `failed_scripts: [...]`. The agent sees what broke and decides what to try next.
68
+ - `--inject-script "<inline-js>"` or `--inject-script @file.js` — run JS before the page's own scripts. Use it to shim a missing global (the canonical `window.lunr` cascade kind of thing).
69
+
70
+ **Detect cross-call state changes.**
71
+
72
+ - `heso read` always returns a `content_hash`. Pass `--since <prev_hash>` to get a `delta` describing what changed (`actions_added`, `actions_removed`, `forms_changed`, `text_changed`, `title_changed`).
73
+
74
+ **Stateful sessions.**
75
+
76
+ - `heso serve` — JSON-RPC over stdin/stdout. Cookies, DOM mutations, listeners, and history persist across calls. Useful for login → navigate → scrape flows.
77
+
78
+ ## What it can't do
79
+
80
+ - **No rendering.** No canvas, WebGL, CSS layout, or video. If the meaning is in pixels, use a real browser.
81
+ - **CAPTCHAs and hard bot-detect.** Hits one, stops. The default user-agent is `Mozilla/5.0 (compatible; heso/0.0.1)` so anything fingerprinting will see us coming.
82
+ - **Pages built on tech we don't simulate.** Service Workers, WebRTC, WebUSB, WebBluetooth — not supported.
83
+ - **Sites whose JS we can't run.** QuickJS isn't V8. Most works; some doesn't.
84
+ - **Sibling-script cascades we haven't shimmed.** When script A sets `window.X` and script B reads it, and X doesn't exist on first load, heso surfaces the crash and the agent can `--inject-script` a stub.
85
+
86
+ ## Quickstart
87
+
88
+ ```sh
89
+ cargo build --release -p heso-cli
90
+ ./target/release/heso open https://example.com
91
+ ```
92
+
93
+ You get JSON: title, description, a heading tree, and a list of clickable elements numbered `@e0`, `@e1`, and so on.
94
+
95
+ For the full walk-through — installation, every verb with its inputs and outputs, JSON-RPC integration patterns, recipes — see **[heso.ca/docs](https://www.heso.ca/docs)**.
96
+
97
+ ## Examples
98
+
99
+ Search the web, then read the top hits in parallel:
100
+
101
+ ```sh
102
+ heso search "rust web scraping" --limit 5
103
+ heso batch read url1 url2 url3 --parallel 2
104
+ ```
105
+
106
+ Read everything from one page in one call:
107
+
108
+ ```sh
109
+ heso read https://nextjs.org/
110
+ # → { title, text, actions, forms, cookies, console, framework,
111
+ # content_hash, lazy_hints, partial: false, ... }
112
+ ```
113
+
114
+ Find by visible text, click, follow:
115
+
116
+ ```sh
117
+ heso click https://news.ycombinator.com --text "More"
118
+ ```
119
+
120
+ Wait for an SPA condition:
121
+
122
+ ```sh
123
+ heso wait https://app.example.com/ --selector-exists ".dashboard" --timeout 5s
124
+ ```
125
+
126
+ Rescue a broken site with a polyfill:
127
+
128
+ ```sh
129
+ heso open https://shoelace.style --best-effort \
130
+ --inject-script "window.lunr = (() => ({ Index: { load: () => ({}) } }))()"
131
+ ```
132
+
133
+ Multi-step session over stdio:
134
+
135
+ ```sh
136
+ heso serve
137
+ # → JSON-RPC. Page state, cookies, DOM all persist across requests.
138
+ ```
139
+
140
+ Reproducibility (same seed → same output across machines):
141
+
142
+ ```sh
143
+ heso eval-js --seed 42 'Math.random()' # 0.5140492957650241
144
+ heso eval-js --seed 42 'Math.random()' # 0.5140492957650241
145
+ ```
146
+
147
+ ## Use as an agent skill
148
+
149
+ heso is built to be a tool an agent calls, not a library a human drives. The cleanest integration is the skill markdown pattern that Claude Code, Cursor, Aider, Cline, and similar harnesses use:
150
+
151
+ ```markdown
152
+ ---
153
+ name: heso
154
+ description: Use the heso headless browser (one Rust binary, no Chromium, no Node) to search the web, fetch pages, run their JavaScript, extract content, navigate, fill forms, or click links. Prefer this over WebFetch when you need a DOM, stateful clicks, or framework-rendered content.
155
+ ---
156
+
157
+ ## Verbs
158
+
159
+ - `heso search "<query>" [--limit N]` — web search via DDG + Wikipedia
160
+ - `heso open <url>` — page summary
161
+ - `heso read <url> [--complete]` — full content + actions + forms (use --complete for lazy-loaded sites)
162
+ - `heso wait <url> --selector-exists ".x"` — block until a condition is true
163
+ - `heso batch [open|read] <urls...> [--parallel N]` — parallel scrape
164
+ - `heso click <url> --text "..." | --selector "..." | @eN` — click
165
+ - `heso fill <url> @eN "value"` — type into input
166
+ - `heso submit <url> @eN` — submit form
167
+ - `heso eval-dom <url> "<js>"` — run JS against the page
168
+ - `heso serve` — multi-step JSON-RPC session
169
+ - `--best-effort` on open/read/wait — exit 0 on partial failures, surface what broke
170
+ - `--inject-script "<js>" | @file` — inject a polyfill before page scripts run
171
+ ```
172
+
173
+ The verbs are the contract. Same shape works in any harness that does tool or skill markdown.
174
+
175
+ ## Stats
176
+
177
+ Measured on Windows 11, AMD x86_64, with the release binary:
178
+
179
+ | Thing | Number |
180
+ |---|---|
181
+ | Binary size | 9.2 MB |
182
+ | Cold start (`open https://example.com`, network included) | ~80 ms |
183
+ | Engine-only (no network, local fixture) | ~35 ms |
184
+ | Batch (8 URLs, `--parallel 8`) | ~1.1 s total |
185
+ | Search (DDG, 5 results) | ~1 s |
186
+
187
+ No comparisons to other tools — different tools have different tradeoffs and "X is faster than Y" framing rarely survives contact with a real workload.
188
+
189
+ ## Status
190
+
191
+ Pre-alpha. Worth trying if the use case fits; not worth depending on in production yet.
192
+
193
+ ## License
194
+
195
+ MIT or Apache-2.0, your choice.
196
+
197
+ ## Try it
198
+
199
+ ```sh
200
+ git clone https://github.com/blank3rs/heso
201
+ cd heso
202
+ cargo build --release -p heso-cli
203
+ ./target/release/heso search "rust web scraping" --limit 5
204
+ ```
205
+
206
+ Full docs: **[heso.ca/docs](https://www.heso.ca/docs)** · Site: **[heso.ca](https://www.heso.ca)**
207
+
@@ -0,0 +1,7 @@
1
+ heso-0.0.1.data/scripts/heso.exe,sha256=R6NgWF16eQpLesSIzib8_AsM048ULG2J9bz3oxbqf0Q,9635328
2
+ heso-0.0.1.dist-info/METADATA,sha256=WEUi6yKBHKHUfc84FcQNdxLnbVdTrcbj37eSObpJYjk,8850
3
+ heso-0.0.1.dist-info/WHEEL,sha256=fxUURV-tpz4EGoGaAcyzIZ0CMCngNhGnetS-bU4AaSg,94
4
+ heso-0.0.1.dist-info/licenses/LICENSE-APACHE,sha256=ucuI4o9HHck9oXzwdJvaOkgTuhJ9MIQK5T5z4X9JxLc,11300
5
+ heso-0.0.1.dist-info/licenses/LICENSE-MIT,sha256=7bJU-Bk62WMmUKHuC9ByAkM31QukHiTEvfE-nKyk48Y,1085
6
+ heso-0.0.1.dist-info/sboms/heso-cli.cyclonedx.json,sha256=DcbAseD9prSnv-271-aUBImIlUfOOxT1QaF8gMLiWJQ,357320
7
+ heso-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.13.3)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Support. While redistributing the Work or
166
+ Derivative Works thereof, You may choose to offer, and charge a
167
+ fee for, acceptance of support, warranty, indemnity, or other
168
+ liability obligations and/or rights consistent with this License.
169
+ However, in accepting such obligations, You may act only on Your
170
+ own behalf and on Your sole responsibility, not on behalf of any
171
+ other Contributor, and only if You agree to indemnify, defend,
172
+ and hold each Contributor harmless for any liability incurred by,
173
+ or claims asserted against, such Contributor by reason of your
174
+ accepting any such warranty or support.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Akshay and heso contributors
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Akshay and heso contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.