@b3os/cli 0.2.0 → 0.2.2

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.
Files changed (217) hide show
  1. package/README.md +87 -7
  2. package/assets/b3os-run.py +137 -0
  3. package/assets/skill/b3os/SKILL.md +111 -0
  4. package/dist/commands/_agents.d.ts +14 -0
  5. package/dist/commands/_agents.js +33 -0
  6. package/dist/commands/_agents.js.map +1 -0
  7. package/dist/commands/_common.js +6 -2
  8. package/dist/commands/_common.js.map +1 -1
  9. package/dist/commands/_context.d.ts +49 -0
  10. package/dist/commands/_context.js +260 -0
  11. package/dist/commands/_context.js.map +1 -0
  12. package/dist/commands/_next.d.ts +39 -0
  13. package/dist/commands/_next.js +77 -0
  14. package/dist/commands/_next.js.map +1 -0
  15. package/dist/commands/agent.d.ts +42 -0
  16. package/dist/commands/agent.js +218 -0
  17. package/dist/commands/agent.js.map +1 -0
  18. package/dist/commands/app.d.ts +2 -0
  19. package/dist/commands/app.js +559 -54
  20. package/dist/commands/app.js.map +1 -1
  21. package/dist/commands/auth.d.ts +88 -2
  22. package/dist/commands/auth.js +354 -44
  23. package/dist/commands/auth.js.map +1 -1
  24. package/dist/commands/docs.d.ts +54 -0
  25. package/dist/commands/docs.js +202 -0
  26. package/dist/commands/docs.js.map +1 -0
  27. package/dist/commands/doctor.d.ts +23 -0
  28. package/dist/commands/doctor.js +313 -0
  29. package/dist/commands/doctor.js.map +1 -0
  30. package/dist/commands/init.d.ts +38 -1
  31. package/dist/commands/init.js +259 -60
  32. package/dist/commands/init.js.map +1 -1
  33. package/dist/commands/listen.d.ts +30 -0
  34. package/dist/commands/listen.js +194 -0
  35. package/dist/commands/listen.js.map +1 -0
  36. package/dist/commands/manifest.d.ts +13 -1
  37. package/dist/commands/manifest.js +81 -18
  38. package/dist/commands/manifest.js.map +1 -1
  39. package/dist/commands/mcp.d.ts +25 -2
  40. package/dist/commands/mcp.js +120 -11
  41. package/dist/commands/mcp.js.map +1 -1
  42. package/dist/commands/sandbox.d.ts +35 -6
  43. package/dist/commands/sandbox.js +208 -9
  44. package/dist/commands/sandbox.js.map +1 -1
  45. package/dist/commands/setup.d.ts +39 -0
  46. package/dist/commands/setup.js +203 -0
  47. package/dist/commands/setup.js.map +1 -0
  48. package/dist/commands/tool.d.ts +154 -0
  49. package/dist/commands/tool.js +785 -0
  50. package/dist/commands/tool.js.map +1 -0
  51. package/dist/config.d.ts +30 -6
  52. package/dist/config.js +39 -8
  53. package/dist/config.js.map +1 -1
  54. package/dist/ctx.d.ts +5 -45
  55. package/dist/ctx.js +25 -160
  56. package/dist/ctx.js.map +1 -1
  57. package/dist/docs/index.json +1 -0
  58. package/dist/docs/pages/actions/call.md +300 -0
  59. package/dist/docs/pages/actions/catalog/airtable.md +737 -0
  60. package/dist/docs/pages/actions/catalog/arxiv.md +166 -0
  61. package/dist/docs/pages/actions/catalog/chainalysis-sanctions.md +125 -0
  62. package/dist/docs/pages/actions/catalog/coingecko.md +1558 -0
  63. package/dist/docs/pages/actions/catalog/deps-dev.md +465 -0
  64. package/dist/docs/pages/actions/catalog/dexscreener.md +568 -0
  65. package/dist/docs/pages/actions/catalog/discord.md +784 -0
  66. package/dist/docs/pages/actions/catalog/finnhub.md +776 -0
  67. package/dist/docs/pages/actions/catalog/frankfurter.md +438 -0
  68. package/dist/docs/pages/actions/catalog/github.md +1853 -0
  69. package/dist/docs/pages/actions/catalog/gmail.md +575 -0
  70. package/dist/docs/pages/actions/catalog/google-calendar.md +654 -0
  71. package/dist/docs/pages/actions/catalog/google-drive.md +502 -0
  72. package/dist/docs/pages/actions/catalog/google-sheets.md +700 -0
  73. package/dist/docs/pages/actions/catalog/hacker-news.md +542 -0
  74. package/dist/docs/pages/actions/catalog/http.md +824 -0
  75. package/dist/docs/pages/actions/catalog/hyperliquid.md +942 -0
  76. package/dist/docs/pages/actions/catalog/jira.md +920 -0
  77. package/dist/docs/pages/actions/catalog/kalshi.md +917 -0
  78. package/dist/docs/pages/actions/catalog/linear.md +1030 -0
  79. package/dist/docs/pages/actions/catalog/markets.md +21 -0
  80. package/dist/docs/pages/actions/catalog/morpho.md +247 -0
  81. package/dist/docs/pages/actions/catalog/notion.md +1077 -0
  82. package/dist/docs/pages/actions/catalog/nws.md +485 -0
  83. package/dist/docs/pages/actions/catalog/open-meteo.md +559 -0
  84. package/dist/docs/pages/actions/catalog/polymarket.md +1523 -0
  85. package/dist/docs/pages/actions/catalog/pushbullet.md +220 -0
  86. package/dist/docs/pages/actions/catalog/resend.md +307 -0
  87. package/dist/docs/pages/actions/catalog/s3.md +513 -0
  88. package/dist/docs/pages/actions/catalog/sec-edgar.md +487 -0
  89. package/dist/docs/pages/actions/catalog/slack.md +2629 -0
  90. package/dist/docs/pages/actions/catalog/stripe.md +1405 -0
  91. package/dist/docs/pages/actions/catalog/wikipedia.md +379 -0
  92. package/dist/docs/pages/actions/catalog.md +46 -0
  93. package/dist/docs/pages/actions/limits.md +50 -0
  94. package/dist/docs/pages/actions/model-tools.md +225 -0
  95. package/dist/docs/pages/actions/packs.md +148 -0
  96. package/dist/docs/pages/actions/settings.md +69 -0
  97. package/dist/docs/pages/actions/tools.md +244 -0
  98. package/dist/docs/pages/actions/triggers.md +149 -0
  99. package/dist/docs/pages/actions.md +88 -0
  100. package/dist/docs/pages/compat/anthropic.md +168 -0
  101. package/dist/docs/pages/compat/e2b.md +194 -0
  102. package/dist/docs/pages/compat/firecrawl.md +138 -0
  103. package/dist/docs/pages/compat/openai.md +168 -0
  104. package/dist/docs/pages/concepts/auth.md +151 -0
  105. package/dist/docs/pages/concepts/beta.md +55 -0
  106. package/dist/docs/pages/concepts/glossary.md +71 -0
  107. package/dist/docs/pages/concepts/ids.md +98 -0
  108. package/dist/docs/pages/concepts/jobs.md +229 -0
  109. package/dist/docs/pages/concepts/latency.md +138 -0
  110. package/dist/docs/pages/concepts/limits.md +191 -0
  111. package/dist/docs/pages/concepts/stack.md +59 -0
  112. package/dist/docs/pages/concepts/timing.md +86 -0
  113. package/dist/docs/pages/concepts/usage.md +110 -0
  114. package/dist/docs/pages/design/b3os-yaml.md +370 -0
  115. package/dist/docs/pages/design/deploy-from-github.md +122 -0
  116. package/dist/docs/pages/design/observability.md +134 -0
  117. package/dist/docs/pages/errors.md +1824 -0
  118. package/dist/docs/pages/infer/chat.md +570 -0
  119. package/dist/docs/pages/infer/limits.md +55 -0
  120. package/dist/docs/pages/infer/messages.md +185 -0
  121. package/dist/docs/pages/infer/responses.md +173 -0
  122. package/dist/docs/pages/infer/settings.md +154 -0
  123. package/dist/docs/pages/infer/speech.md +323 -0
  124. package/dist/docs/pages/infer.md +154 -0
  125. package/dist/docs/pages/introduction.md +162 -0
  126. package/dist/docs/pages/platform/addresses.md +174 -0
  127. package/dist/docs/pages/platform/call-log.md +99 -0
  128. package/dist/docs/pages/platform/custom-domains.md +104 -0
  129. package/dist/docs/pages/platform/keys.md +79 -0
  130. package/dist/docs/pages/platform/limits.md +57 -0
  131. package/dist/docs/pages/platform/members.md +101 -0
  132. package/dist/docs/pages/platform/requests.md +116 -0
  133. package/dist/docs/pages/platform/settings.md +129 -0
  134. package/dist/docs/pages/platform/webhooks.md +68 -0
  135. package/dist/docs/pages/platform.md +67 -0
  136. package/dist/docs/pages/quickstart/mcp.md +94 -0
  137. package/dist/docs/pages/quickstart/sandbox-agent.md +205 -0
  138. package/dist/docs/pages/quickstart/scrape.md +134 -0
  139. package/dist/docs/pages/quickstart.md +45 -0
  140. package/dist/docs/pages/render/inspections.md +162 -0
  141. package/dist/docs/pages/render/limits.md +72 -0
  142. package/dist/docs/pages/render/screenshots.md +179 -0
  143. package/dist/docs/pages/render/settings.md +431 -0
  144. package/dist/docs/pages/render/styles.md +342 -0
  145. package/dist/docs/pages/render/videos.md +272 -0
  146. package/dist/docs/pages/render.md +118 -0
  147. package/dist/docs/pages/routines/callables.md +174 -0
  148. package/dist/docs/pages/routines/definitions.md +361 -0
  149. package/dist/docs/pages/routines/limits.md +117 -0
  150. package/dist/docs/pages/routines/runs.md +328 -0
  151. package/dist/docs/pages/routines/settings.md +104 -0
  152. package/dist/docs/pages/routines/triggers.md +339 -0
  153. package/dist/docs/pages/routines.md +216 -0
  154. package/dist/docs/pages/sandboxes/agents.md +217 -0
  155. package/dist/docs/pages/sandboxes/commands.md +272 -0
  156. package/dist/docs/pages/sandboxes/images.md +166 -0
  157. package/dist/docs/pages/sandboxes/limits.md +143 -0
  158. package/dist/docs/pages/sandboxes/ports.md +260 -0
  159. package/dist/docs/pages/sandboxes/settings.md +358 -0
  160. package/dist/docs/pages/sandboxes/snapshots.md +423 -0
  161. package/dist/docs/pages/sandboxes/swarms.md +146 -0
  162. package/dist/docs/pages/sandboxes/volumes.md +131 -0
  163. package/dist/docs/pages/sandboxes.md +231 -0
  164. package/dist/docs/pages/sdks/cli.md +121 -0
  165. package/dist/docs/pages/sdks/mcp.md +169 -0
  166. package/dist/docs/pages/sdks/python.md +146 -0
  167. package/dist/docs/pages/sdks/typescript.md +202 -0
  168. package/dist/docs/pages/sdks.md +282 -0
  169. package/dist/docs/pages/settings.md +33 -0
  170. package/dist/docs/pages/vault/limits.md +46 -0
  171. package/dist/docs/pages/vault.md +133 -0
  172. package/dist/docs/pages/vision/agent-browser.md +115 -0
  173. package/dist/docs/pages/vision/crawl.md +333 -0
  174. package/dist/docs/pages/vision/extract.md +152 -0
  175. package/dist/docs/pages/vision/fetcher.md +15 -0
  176. package/dist/docs/pages/vision/limits.md +79 -0
  177. package/dist/docs/pages/vision/profiles.md +111 -0
  178. package/dist/docs/pages/vision/proxy.md +131 -0
  179. package/dist/docs/pages/vision/scrape.md +356 -0
  180. package/dist/docs/pages/vision/sessions.md +311 -0
  181. package/dist/docs/pages/vision/settings.md +656 -0
  182. package/dist/docs/pages/vision.md +175 -0
  183. package/dist/errors.d.ts +129 -0
  184. package/dist/errors.js +326 -0
  185. package/dist/errors.js.map +1 -0
  186. package/dist/main.d.ts +1 -1
  187. package/dist/main.js +26 -13
  188. package/dist/main.js.map +1 -1
  189. package/dist/manifest/apply.d.ts +4 -0
  190. package/dist/manifest/apply.js +2 -0
  191. package/dist/manifest/apply.js.map +1 -1
  192. package/dist/manifest/domains.d.ts +50 -0
  193. package/dist/manifest/domains.js +159 -0
  194. package/dist/manifest/domains.js.map +1 -0
  195. package/dist/manifest/link.d.ts +20 -0
  196. package/dist/manifest/link.js +24 -0
  197. package/dist/manifest/link.js.map +1 -0
  198. package/dist/manifest/record.d.ts +1 -1
  199. package/dist/tool/archive.d.ts +33 -0
  200. package/dist/tool/archive.js +174 -0
  201. package/dist/tool/archive.js.map +1 -0
  202. package/dist/tool/calls.d.ts +46 -0
  203. package/dist/tool/calls.js +274 -0
  204. package/dist/tool/calls.js.map +1 -0
  205. package/dist/tool/checks.d.ts +21 -0
  206. package/dist/tool/checks.js +145 -0
  207. package/dist/tool/checks.js.map +1 -0
  208. package/dist/tool/elf.d.ts +19 -0
  209. package/dist/tool/elf.js +107 -0
  210. package/dist/tool/elf.js.map +1 -0
  211. package/dist/tool/predict.d.ts +8 -0
  212. package/dist/tool/predict.js +38 -0
  213. package/dist/tool/predict.js.map +1 -0
  214. package/dist/tool/ustar.d.ts +5 -0
  215. package/dist/tool/ustar.js +220 -0
  216. package/dist/tool/ustar.js.map +1 -0
  217. package/package.json +6 -5
@@ -0,0 +1,656 @@
1
+ # Vision settings
2
+
3
+ > Every setting for scrapes, batches, crawls, maps and browser sessions, with its default, values and an example, and what is fixed in the beta.
4
+
5
+ Source: https://docs.beta.b3os.org/vision/settings.md
6
+
7
+ Set these in the body of each request. Batches and crawls take the scrape settings under `scrape` and apply them to every page: `{"scrape": {"engine": "fetch"}}`. [Scrape a page](https://docs.beta.b3os.org/vision/scrape) explains how the tiers and the cache work together.
8
+
9
+ | Setting | Default |
10
+ |---|---|
11
+ | [Engine](#engine): `engine` | `auto` |
12
+ | [Browser](#browser): `browser` | `headless-shell` (scrape), `chrome` (session) |
13
+ | [Formats](#formats): `formats` | `markdown` |
14
+ | [Main content only](#main-content-only): `only_main_content` | `true` |
15
+ | [Wait after load](#wait-after-load): `wait_for_ms` | 0 ms |
16
+ | [Scrape timeout](#scrape-timeout): `timeout_ms` | 30,000 ms |
17
+ | [Walls](#walls): `walls` | `free` |
18
+ | [Robots.txt](#robotstxt): `respect_robots` | `false` |
19
+ | [Locale](#locale): `locale` | `en-US` |
20
+ | [Timezone](#timezone): `timezone` | `America/Los_Angeles` |
21
+ | [Viewport](#viewport): `viewport` | 1280 by 800 CSS pixels, or 390 by 844 with `mobile` ([per field](#viewport)) |
22
+ | [Phone](#phone): `mobile` | `false` |
23
+ | [Ad blocking](#ad-blocking): `block_ads` | `true` (scrape), `false` (session) |
24
+ | [Resources not loaded](#resources-not-loaded): `block_resources` | `image`, `media`, `font`; none when a screenshot is asked for ([per field](#resources-not-loaded)) |
25
+ | [Screenshot](#screenshot): `screenshot.format` | `jpeg` ([per field](#screenshot)) |
26
+ | [PDF reading](#pdf-reading): `pdf.mode` | `text` |
27
+ | [PDF page cap](#pdf-page-cap): `pdf.max_pages` | 500 (the node's `vision.pdf.pages_max`) |
28
+ | [PDF page markers](#pdf-page-markers): `pdf.page_markers` | `true` |
29
+ | [PDF pages apart](#pdf-pages-apart): `pdf.pages` | `false` |
30
+ | [Cache age](#cache-age): `max_age_ms` | 172,800,000 ms (2 days) |
31
+ | [Store in the cache](#store-in-the-cache): `store_in_cache` | `true` |
32
+ | [Cache only](#cache-only): `cache_only` | `false` |
33
+ | [Proxy](#proxy): `proxy` | the node's default, `none` unless its operator set `auto` |
34
+ | [Proxy country](#proxy-country): `proxy_country` | `US` |
35
+ | [Page limit](#page-limit): `limit` | 100 pages (crawl), 1,000 pages (map) |
36
+ | [Depth](#depth): `max_depth` | 5 |
37
+ | [Sitemaps](#sitemaps): `sitemap` | `include` |
38
+ | [Whole domain](#whole-domain): `crawl_entire_domain` | `false` |
39
+ | [Subdomains](#subdomains): `allow_subdomains` | `false` ([per field](#subdomains)) |
40
+ | [Other sites](#other-sites): `allow_external_links` | `false` |
41
+ | [Query strings](#query-strings): `ignore_query_parameters` | `false` (crawl), `true` (map) |
42
+ | [Spacing](#spacing): `delay_ms` | 250 ms, or robots.txt's Crawl-delay with `respect_robots` |
43
+ | [Pages at once](#pages-at-once): `max_concurrency` | your plan's scrapes at once (also the most) ([per field](#pages-at-once)) |
44
+ | [Invalid URLs](#invalid-urls): `ignore_invalid_urls` | `false` |
45
+ | [Session lifetime](#session-lifetime): `timeout_s` | 300 s |
46
+ | [Save the profile](#save-the-profile): `persist_profile` | `false` |
47
+ | [Timeline thumbnails](#timeline-thumbnails): `thumbnails` | `false` |
48
+
49
+ ## How the page is read
50
+
51
+ ### Engine
52
+
53
+ Which tier reads the page. `auto` tries the cache, then a plain HTTP fetch, and starts a browser only when the page needs one. `fetch` never starts a browser: faster and cheaper, but a page that builds its content with JavaScript comes back thin. `browser` always renders, and `actions`, `screenshot` and `profile` imply it.
54
+
55
+ - **Field:** `engine` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
56
+ - **Default:** `auto`
57
+ - **Values:** `auto`, `fetch` or `browser`
58
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
59
+ - **Guide:** [Choose the engine](https://docs.beta.b3os.org/vision/scrape#choose-the-engine)
60
+
61
+ ```json
62
+ {"url": "https://example.com", "engine": "fetch"}
63
+ ```
64
+
65
+ ```bash
66
+ b3os scrape https://example.com --engine fetch
67
+ ```
68
+
69
+ ### Browser
70
+
71
+ Which browser renders the page. A scrape's `headless-shell` page renders in the shared scrape pool. `chrome` is full Chrome, with `window.chrome`, plugins and WebGL; a scrape that asks for it renders in a browser of its own, which counts toward `vision.sessions.concurrent` while it runs. A session that asks for `headless-shell` starts its browser cold. Not allowed with `engine: fetch`.
72
+
73
+ - **Field:** `browser` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape) and [session](https://docs.beta.b3os.org/api/post-v1-vision-sessions)
74
+ - **Default:** `headless-shell` (scrape), `chrome` (session)
75
+ - **Values:** `chrome` or `headless-shell`
76
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
77
+ - **Guide:** [Browsers](https://docs.beta.b3os.org/vision#browsers)
78
+
79
+ ```json
80
+ {"url": "https://example.com", "browser": "chrome"}
81
+ ```
82
+
83
+ ```bash
84
+ b3os scrape https://example.com --browser chrome
85
+ ```
86
+
87
+ ### Formats
88
+
89
+ What comes back. Each format is one more member of the result. `screenshot` needs a browser, and `json` asks the node's model to fill a JSON Schema from the page, which also needs the `infer:run` scope and bills its tokens.
90
+
91
+ - **Field:** `formats` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
92
+ - **Default:** `markdown`
93
+ - **Values:** any of `markdown`, `html`, `raw_html`, `text`, `links`, `metadata`, `screenshot` and `json`
94
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
95
+ - **Guide:** [Formats](https://docs.beta.b3os.org/vision/scrape#formats)
96
+
97
+ ```json
98
+ {"url": "https://example.com", "formats": ["markdown", "links"]}
99
+ ```
100
+
101
+ ```bash
102
+ b3os scrape https://example.com --format markdown --format links
103
+ ```
104
+
105
+ ### Main content only
106
+
107
+ Drops headers, navigation, footers and sidebars from the Markdown, HTML and text. Turn it off to keep the whole page.
108
+
109
+ - **Field:** `only_main_content` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
110
+ - **Default:** `true`
111
+ - **Values:** `true` or `false`
112
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
113
+ - **Guide:** [Main content only](https://docs.beta.b3os.org/vision/scrape#main-content-only)
114
+
115
+ ```json
116
+ {"url": "https://example.com", "only_main_content": false}
117
+ ```
118
+
119
+ ```bash
120
+ b3os scrape https://example.com --all-content
121
+ ```
122
+
123
+ ### Wait after load
124
+
125
+ Extra time after the page is ready and before vision reads it, for content that arrives late. It applies when a browser renders the page, and it counts inside `timeout_ms`.
126
+
127
+ - **Field:** `wait_for_ms` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
128
+ - **Default:** 0 ms
129
+ - **Values:** 0 to 30,000 ms
130
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
131
+
132
+ ```json
133
+ {"url": "https://example.com", "wait_for_ms": 2000}
134
+ ```
135
+
136
+ ```bash
137
+ b3os scrape https://example.com --wait-for-ms 2000
138
+ ```
139
+
140
+ ### Scrape timeout
141
+
142
+ How long the whole request may take, the wait after load included. A scrape that runs out answers `504 scrape_timeout` and bills nothing. With `engine: auto`, a page the fetch found thin is rendered in a browser only while at least 5 seconds remain.
143
+
144
+ - **Field:** `timeout_ms` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape) and [map](https://docs.beta.b3os.org/api/post-v1-vision-map)
145
+ - **Default:** 30,000 ms
146
+ - **Values:** 1,000 to 60,000 ms
147
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
148
+
149
+ ```json
150
+ {"url": "https://example.com", "timeout_ms": 60000}
151
+ ```
152
+
153
+ ### Walls
154
+
155
+ What a wall costs: a refusal or challenge page, `page_state` `blocked` or `captcha`. `free` bills nothing and returns no content, only `page_state`, `status_code`, `final_url` and `content_withheld: true`. `bill` bills it as a page and returns its content. A scrape with `actions` bills either way.
156
+
157
+ - **Field:** `walls` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
158
+ - **Default:** `free`
159
+ - **Values:** `free` or `bill`
160
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
161
+ - **Guide:** [Walls are free](https://docs.beta.b3os.org/vision/scrape#walls-are-free)
162
+
163
+ ```json
164
+ {"url": "https://example.com", "walls": "bill"}
165
+ ```
166
+
167
+ ### Robots.txt
168
+
169
+ Checks the site's robots.txt (product token `B3OSBot`) and Content Signals before fetching. A URL they disallow answers `403 robots_disallowed`; a crawl skips it and uses the file's Crawl-delay. Off, vision does not read robots.txt.
170
+
171
+ - **Field:** `respect_robots` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape), [crawl](https://docs.beta.b3os.org/api/post-v1-vision-crawls) and [map](https://docs.beta.b3os.org/api/post-v1-vision-map)
172
+ - **Default:** `false`
173
+ - **Values:** `true` or `false`
174
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
175
+ - **Guide:** [Rules vision follows](https://docs.beta.b3os.org/vision#rules-vision-follows)
176
+
177
+ ```json
178
+ {"url": "https://example.com", "respect_robots": true}
179
+ ```
180
+
181
+ ```bash
182
+ b3os crawl https://example.com --respect-robots
183
+ ```
184
+
185
+ ## How the browser presents itself
186
+
187
+ These apply when a browser renders the page. A page read by the plain fetch sends only `locale`, as `Accept-Language`.
188
+
189
+ ### Locale
190
+
191
+ The language the page sees: `Accept-Language`, `navigator.language` and the browser's own language. Set it for a site that picks its language from the request.
192
+
193
+ - **Field:** `locale` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape) and [session](https://docs.beta.b3os.org/api/post-v1-vision-sessions)
194
+ - **Default:** `en-US`
195
+ - **Values:** a BCP 47 language tag, such as `de-DE` or `ja-JP`
196
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
197
+
198
+ ```json
199
+ {"url": "https://example.com", "locale": "de-DE"}
200
+ ```
201
+
202
+ ### Timezone
203
+
204
+ The time zone the page's `Date` and `Intl` use. The default is where the node's traffic leaves from.
205
+
206
+ - **Field:** `timezone` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape) and [session](https://docs.beta.b3os.org/api/post-v1-vision-sessions)
207
+ - **Default:** `America/Los_Angeles`
208
+ - **Values:** an IANA time zone name, such as `Europe/Berlin`
209
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
210
+
211
+ ```json
212
+ {"url": "https://example.com", "timezone": "Europe/Berlin"}
213
+ ```
214
+
215
+ ### Viewport
216
+
217
+ The browser window's size. A page that lays itself out by width shows its desktop or narrow layout from it.
218
+
219
+ - **Field:** `viewport` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape) and [session](https://docs.beta.b3os.org/api/post-v1-vision-sessions)
220
+ - **Default:** 1280 by 800 CSS pixels, or 390 by 844 with `mobile` (scrape), 1280 by 800 CSS pixels (session)
221
+ - **Values:** `width`: 320 to 3,840; `height`: 240 to 2,160
222
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
223
+
224
+ ```json
225
+ {"url": "https://example.com", "viewport": {"width": 1440, "height": 900}}
226
+ ```
227
+
228
+ ### Phone
229
+
230
+ Presents a phone: a narrow viewport, a phone's user agent and touch. Use it for a site that serves phones a different page.
231
+
232
+ - **Field:** `mobile` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
233
+ - **Default:** `false`
234
+ - **Values:** `true` or `false`
235
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
236
+
237
+ ```json
238
+ {"url": "https://example.com", "mobile": true}
239
+ ```
240
+
241
+ ```bash
242
+ b3os scrape https://example.com --mobile
243
+ ```
244
+
245
+ ### Ad blocking
246
+
247
+ Blocks requests to ad and tracker hosts and hides cookie banners. Turn it off to read the page as a visitor with no blocker sees it.
248
+
249
+ - **Field:** `block_ads` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape) and [session](https://docs.beta.b3os.org/api/post-v1-vision-sessions)
250
+ - **Default:** `true` (scrape), `false` (session)
251
+ - **Values:** `true` or `false`
252
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
253
+
254
+ ```json
255
+ {"url": "https://example.com", "block_ads": false}
256
+ ```
257
+
258
+ ### Resources not loaded
259
+
260
+ Resource types the browser does not download. Fewer bytes make a faster page; a page whose layout needs its stylesheets or fonts reads worse. `[]` loads everything.
261
+
262
+ - **Field:** `block_resources` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape) and [session](https://docs.beta.b3os.org/api/post-v1-vision-sessions)
263
+ - **Default:** `image`, `media`, `font`; none when a screenshot is asked for (scrape), none (session)
264
+ - **Values:** any of `image`, `media`, `font` and `stylesheet`
265
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
266
+
267
+ ```json
268
+ {"url": "https://example.com", "block_resources": []}
269
+ ```
270
+
271
+ ### Screenshot
272
+
273
+ How the `screenshot` format encodes the page. These defaults are vision's and differ from render's screenshots, which default to WebP at 90. `full_page` captures the whole scroll height instead of the viewport.
274
+
275
+ - **Field:** `screenshot.format`, `screenshot.quality` and `screenshot.full_page` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
276
+ - **Default:** `jpeg` (`screenshot.format`), 80 (`screenshot.quality`), `false` (`screenshot.full_page`)
277
+ - **Values:** `jpeg`, `png` or `webp` (`screenshot.format`); 1 to 100 (`screenshot.quality`); `true` or `false` (`screenshot.full_page`)
278
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
279
+
280
+ ```json
281
+ {"url": "https://example.com", "formats": ["screenshot"], "screenshot": {"format": "webp", "quality": 90}}
282
+ ```
283
+
284
+ ## PDFs
285
+
286
+ ### PDF reading
287
+
288
+ Whether a URL that serves a PDF is read. `text` reads its text layer into Markdown, one `vision.page` per page read. `off` answers a PDF with `422 content_type_unsupported`, and a crawl then skips links that end in `.pdf`.
289
+
290
+ - **Field:** `pdf.mode` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
291
+ - **Default:** `text`
292
+ - **Values:** `text` or `off`
293
+ - **Invalid value:** [`422 content_type_unsupported`](https://docs.beta.b3os.org/errors#content_type_unsupported)
294
+
295
+ ```json
296
+ {"url": "https://example.com/report.pdf", "pdf": {"mode": "off"}}
297
+ ```
298
+
299
+ ### PDF page cap
300
+
301
+ Reads at most this many pages of a PDF, from the first, and bills only those. A longer file comes back with `pdf.truncated: max_pages` and a warning. A value above the node's cap is refused.
302
+
303
+ - **Field:** `pdf.max_pages` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
304
+ - **Default:** 500 (the node's `vision.pdf.pages_max`)
305
+ - **Values:** 1 or more; at most the node's `vision.pdf.pages_max` (500)
306
+ - **Invalid value:** [`422 limit_exceeded`](https://docs.beta.b3os.org/errors#limit_exceeded)
307
+
308
+ ```json
309
+ {"url": "https://example.com/report.pdf", "pdf": {"max_pages": 20}}
310
+ ```
311
+
312
+ ### PDF page markers
313
+
314
+ Puts a `---` rule and an HTML comment naming the next page number between the pages of a PDF's Markdown, never before the first page (the marker Firecrawl's `pageMarkers` writes). The Firecrawl surface leaves them off unless `pageMarkers` is set, as Firecrawl does.
315
+
316
+ - **Field:** `pdf.page_markers` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
317
+ - **Default:** `true`
318
+ - **Values:** `true` or `false`
319
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
320
+
321
+ ```json
322
+ {"url": "https://example.com/report.pdf", "pdf": {"page_markers": false}}
323
+ ```
324
+
325
+ ### PDF pages apart
326
+
327
+ Also returns each page's Markdown on its own, in `pdf.page_markdown`.
328
+
329
+ - **Field:** `pdf.pages` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
330
+ - **Default:** `false`
331
+ - **Values:** `true` or `false`
332
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
333
+
334
+ ```json
335
+ {"url": "https://example.com/report.pdf", "pdf": {"pages": true}}
336
+ ```
337
+
338
+ ## The cache
339
+
340
+ ### Cache age
341
+
342
+ Accepts a cached copy up to this old. A cached page answers fastest and may be stale. `0` always fetches.
343
+
344
+ - **Field:** `max_age_ms` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
345
+ - **Default:** 172,800,000 ms (2 days)
346
+ - **Values:** 0 ms or more
347
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
348
+ - **Guide:** [The cache](https://docs.beta.b3os.org/vision/scrape#the-cache)
349
+
350
+ ```json
351
+ {"url": "https://example.com", "max_age_ms": 0}
352
+ ```
353
+
354
+ ```bash
355
+ b3os scrape https://example.com --max-age-ms 0
356
+ ```
357
+
358
+ ### Store in the cache
359
+
360
+ Stores this result for later scrapes. A request with headers, a profile or actions is never shared with other organizations either way.
361
+
362
+ - **Field:** `store_in_cache` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
363
+ - **Default:** `true`
364
+ - **Values:** `true` or `false`
365
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
366
+
367
+ ```json
368
+ {"url": "https://example.com", "store_in_cache": false}
369
+ ```
370
+
371
+ ### Cache only
372
+
373
+ Answers from the cache and never contacts the site: a cached copy, or `404 scrape_no_cached_data`, which is not billed. Cannot be combined with `headers`, `profile`, `actions` or a screenshot.
374
+
375
+ - **Field:** `cache_only` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
376
+ - **Default:** `false`
377
+ - **Values:** `true` or `false`
378
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
379
+ - **Guide:** [Cache only](https://docs.beta.b3os.org/vision/scrape#cache-only)
380
+
381
+ ```json
382
+ {"url": "https://example.com", "cache_only": true}
383
+ ```
384
+
385
+ ## Where the request leaves from
386
+
387
+ ### Proxy
388
+
389
+ Where a single scrape leaves from. `none` is the node's own address. `auto` leaves from the node and, when the page comes back a wall, asks once more from a residential address, unless the request or the site rules that out; where residential reads are off it is exactly `none` and never an error. `residential` reads the page from a residential address, every request of the scrape. A URL is your own proxy, without credentials; the object form takes the username and password from a `basic` vault connection that lists the proxy's host (needs `vault:run`). A URL with a username or password in it is refused. Batches, crawls, sessions and the Firecrawl surface do not take it yet.
390
+
391
+ - **Field:** `proxy` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
392
+ - **Default:** the node's default, `none` unless its operator set `auto`
393
+ - **Values:** `none`, `auto`, `residential`, your proxy's `http://host:port`, or `{"url": "http://host:port", "connection": "conn_..."}`
394
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request), [`422 option_not_allowed`](https://docs.beta.b3os.org/errors#option_not_allowed), [`403 proxy_not_allowed`](https://docs.beta.b3os.org/errors#proxy_not_allowed), [`502 proxy_unreachable`](https://docs.beta.b3os.org/errors#proxy_unreachable), [`502 proxy_auth_failed`](https://docs.beta.b3os.org/errors#proxy_auth_failed), [`502 proxy_refused`](https://docs.beta.b3os.org/errors#proxy_refused)
395
+ - **Guide:** [Proxies](https://docs.beta.b3os.org/vision/proxy)
396
+
397
+ ```json
398
+ {"url": "https://example.com", "proxy": "auto"}
399
+ ```
400
+
401
+ ### Proxy country
402
+
403
+ The country of the residential address, for `proxy` `auto` and `residential` only. A country the node does not offer answers `422 option_not_allowed` with the list. Given with `none` or your own proxy, it is a 400. Locale and time zone do not follow it: set `locale` and `timezone` yourself.
404
+
405
+ - **Field:** `proxy_country` on [scrape](https://docs.beta.b3os.org/api/post-v1-vision-scrape)
406
+ - **Default:** `US`
407
+ - **Values:** two letters (ISO 3166-1 alpha-2), any case, among the countries the node offers
408
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request), [`422 option_not_allowed`](https://docs.beta.b3os.org/errors#option_not_allowed)
409
+ - **Guide:** [Residential reads](https://docs.beta.b3os.org/vision/proxy#residential-reads)
410
+
411
+ ```json
412
+ {"url": "https://example.com", "proxy": "residential", "proxy_country": "US"}
413
+ ```
414
+
415
+ ## Crawls, batches and maps
416
+
417
+ ### Page limit
418
+
419
+ The most pages a crawl scrapes, or the most URLs a map returns. A crawl over your plan's `vision.crawl.pages_max` is refused before it starts.
420
+
421
+ - **Field:** `limit` on [crawl](https://docs.beta.b3os.org/api/post-v1-vision-crawls) and [map](https://docs.beta.b3os.org/api/post-v1-vision-map)
422
+ - **Default:** 100 pages (crawl), 1,000 pages (map)
423
+ - **Values:** 1 to 500 pages (crawl); 1 to 5,000 pages (map)
424
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request), [`422 limit_exceeded`](https://docs.beta.b3os.org/errors#limit_exceeded)
425
+
426
+ ```json
427
+ {"url": "https://example.com", "limit": 50}
428
+ ```
429
+
430
+ ```bash
431
+ b3os crawl https://example.com --limit 50
432
+ ```
433
+
434
+ ### Depth
435
+
436
+ The most link hops from the start URL. URLs from a sitemap count as depth 0.
437
+
438
+ - **Field:** `max_depth` on [crawl](https://docs.beta.b3os.org/api/post-v1-vision-crawls)
439
+ - **Default:** 5
440
+ - **Values:** 0 to 20
441
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
442
+
443
+ ```json
444
+ {"url": "https://example.com", "max_depth": 2}
445
+ ```
446
+
447
+ ```bash
448
+ b3os crawl https://example.com --max-depth 2
449
+ ```
450
+
451
+ ### Sitemaps
452
+
453
+ Whether to use the site's sitemaps beside its links (`include`), ignore them (`skip`), or use only them (`only`).
454
+
455
+ - **Field:** `sitemap` on [crawl](https://docs.beta.b3os.org/api/post-v1-vision-crawls) and [map](https://docs.beta.b3os.org/api/post-v1-vision-map)
456
+ - **Default:** `include`
457
+ - **Values:** `include`, `skip` or `only`
458
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
459
+
460
+ ```json
461
+ {"url": "https://example.com", "sitemap": "only"}
462
+ ```
463
+
464
+ ```bash
465
+ b3os map https://example.com --sitemap only
466
+ ```
467
+
468
+ ### Whole domain
469
+
470
+ Follows links to parent and sibling paths too, not only to paths below the start URL.
471
+
472
+ - **Field:** `crawl_entire_domain` on [crawl](https://docs.beta.b3os.org/api/post-v1-vision-crawls)
473
+ - **Default:** `false`
474
+ - **Values:** `true` or `false`
475
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
476
+
477
+ ```json
478
+ {"url": "https://example.com", "crawl_entire_domain": true}
479
+ ```
480
+
481
+ ### Subdomains
482
+
483
+ Whether a crawl follows, or a map lists, URLs on the site's subdomains. The two fields default differently: a crawl stays on its host, a map lists subdomains.
484
+
485
+ - **Field:** `allow_subdomains` and `include_subdomains` on [crawl](https://docs.beta.b3os.org/api/post-v1-vision-crawls) and [map](https://docs.beta.b3os.org/api/post-v1-vision-map)
486
+ - **Default:** `false` (`allow_subdomains`, crawl), `true` (`include_subdomains`, map)
487
+ - **Values:** `true` or `false`
488
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
489
+
490
+ ```json
491
+ {"url": "https://example.com", "allow_subdomains": true}
492
+ ```
493
+
494
+ ```bash
495
+ b3os crawl https://example.com --include-subdomains
496
+ ```
497
+
498
+ ### Other sites
499
+
500
+ Scrapes the pages on other sites that the crawl links to, one hop. Their own links are not followed.
501
+
502
+ - **Field:** `allow_external_links` on [crawl](https://docs.beta.b3os.org/api/post-v1-vision-crawls)
503
+ - **Default:** `false`
504
+ - **Values:** `true` or `false`
505
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
506
+
507
+ ```json
508
+ {"url": "https://example.com", "allow_external_links": true}
509
+ ```
510
+
511
+ ### Query strings
512
+
513
+ Treats URLs that differ only in their query string as one page. A map does by default; a crawl does not.
514
+
515
+ - **Field:** `ignore_query_parameters` on [crawl](https://docs.beta.b3os.org/api/post-v1-vision-crawls) and [map](https://docs.beta.b3os.org/api/post-v1-vision-map)
516
+ - **Default:** `false` (crawl), `true` (map)
517
+ - **Values:** `true` or `false`
518
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
519
+
520
+ ```json
521
+ {"url": "https://example.com", "ignore_query_parameters": true}
522
+ ```
523
+
524
+ ### Spacing
525
+
526
+ The least time between this crawl's requests to one host. Whatever you set, job pages to one host start at least 250 ms apart node-wide, at most 2 at a time for your organization, and a 429 or 503 from the host pauses them for its `Retry-After`.
527
+
528
+ - **Field:** `delay_ms` on [crawl](https://docs.beta.b3os.org/api/post-v1-vision-crawls)
529
+ - **Default:** 250 ms, or robots.txt's Crawl-delay with `respect_robots`
530
+ - **Values:** 0 to 60,000 ms
531
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
532
+
533
+ ```json
534
+ {"url": "https://example.com", "delay_ms": 1000}
535
+ ```
536
+
537
+ ### Pages at once
538
+
539
+ How many pages of one batch or crawl are scraped at once. A batch takes at most your `vision.scrape.concurrent` limit. A higher value can finish a job sooner when its pages are on many hosts; pages to one host are spaced either way.
540
+
541
+ - **Field:** `max_concurrency` on [batch](https://docs.beta.b3os.org/api/post-v1-vision-batches) and [crawl](https://docs.beta.b3os.org/api/post-v1-vision-crawls)
542
+ - **Default:** your plan's scrapes at once (also the most) (batch), 8 (also the most) (crawl)
543
+ - **Values:** 1 or more
544
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
545
+
546
+ ```json
547
+ {"urls": ["https://example.com/a", "https://example.com/b"], "max_concurrency": 2}
548
+ ```
549
+
550
+ ```bash
551
+ b3os scrape https://example.com/a https://example.com/b --max-concurrency 2
552
+ ```
553
+
554
+ ### Invalid URLs
555
+
556
+ Skips URLs that do not parse, and lists them in `result.invalid_urls`, instead of refusing the whole batch.
557
+
558
+ - **Field:** `ignore_invalid_urls` on [batch](https://docs.beta.b3os.org/api/post-v1-vision-batches)
559
+ - **Default:** `false`
560
+ - **Values:** `true` or `false`
561
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
562
+
563
+ ```json
564
+ {"urls": ["https://example.com/a", "not a url"], "ignore_invalid_urls": true}
565
+ ```
566
+
567
+ ## Browser sessions
568
+
569
+ ### Session lifetime
570
+
571
+ Closes the session this many seconds after it was created. A session bills browser time while it is open, so close it when you are done.
572
+
573
+ - **Field:** `timeout_s` on [session](https://docs.beta.b3os.org/api/post-v1-vision-sessions)
574
+ - **Default:** 300 s
575
+ - **Values:** 10 to 1,800 s
576
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
577
+ - **Guide:** [Create a session](https://docs.beta.b3os.org/vision/sessions#create-a-session)
578
+
579
+ ```json
580
+ {"timeout_s": 900}
581
+ ```
582
+
583
+ ```bash
584
+ b3os session create --timeout-s 900
585
+ ```
586
+
587
+ ### Save the profile
588
+
589
+ `persist_profile` saves the session's cookies and storage back to its `profile` when it closes; the profile is locked meanwhile. `overwrite_profile` saves even when another session saved a newer revision since this one loaded it.
590
+
591
+ - **Field:** `persist_profile` and `overwrite_profile` on [session](https://docs.beta.b3os.org/api/post-v1-vision-sessions)
592
+ - **Default:** `false`
593
+ - **Values:** `true` or `false`
594
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
595
+ - **Guide:** [Profiles](https://docs.beta.b3os.org/vision/profiles)
596
+
597
+ ```json
598
+ {"profile": "github", "persist_profile": true}
599
+ ```
600
+
601
+ ```bash
602
+ b3os session create --profile github --persist-profile
603
+ ```
604
+
605
+ ### Timeline thumbnails
606
+
607
+ Adds a small JPEG of the viewport, taken after each act step, to that step's row in the session timeline. Each one is one more capture in the step's time.
608
+
609
+ - **Field:** `thumbnails` on [session](https://docs.beta.b3os.org/api/post-v1-vision-sessions)
610
+ - **Default:** `false`
611
+ - **Values:** `true` or `false`
612
+ - **Invalid value:** [`400 invalid_request`](https://docs.beta.b3os.org/errors#invalid_request)
613
+
614
+ ```json
615
+ {"thumbnails": true}
616
+ ```
617
+
618
+ ## Fixed in the beta
619
+
620
+ These work one way in the beta, and no request field changes them.
621
+
622
+ ### TLS verification
623
+
624
+ **Always on.** Vision checks every site's certificate. A site with an expired, self-signed or mismatched certificate fails, and retrying does not help: the fetch answers `502 upstream_unreachable` with `reason: tls`, and the browser `502 navigation_failed` with Chrome's certificate error. The Firecrawl surface accepts `skipTlsVerification` and ignores it.
625
+
626
+ - **Error:** [`502 upstream_unreachable`](https://docs.beta.b3os.org/errors#upstream_unreachable), [`502 navigation_failed`](https://docs.beta.b3os.org/errors#navigation_failed)
627
+
628
+ ### PDF files
629
+
630
+ **Read from their text layer.** A URL that serves a PDF (its type says so, or an untyped or octet-stream body starts with `%PDF-`) is read by the HTTP fetch tier, never in a browser: Markdown in reading order with headings, lists, clear tables and links, pages joined by Firecrawl's page marker (an HTML comment naming the page number). It bills one `vision.page` per page read. Pages without a text layer (scans) come back empty with a warning, as there is no OCR yet. `pdf.mode: off`, and on the Firecrawl surface `parsers: []` or `parsePDF: false`, answer `422 content_type_unsupported` instead.
631
+
632
+ - **Error:** [`422 pdf_unreadable`](https://docs.beta.b3os.org/errors#pdf_unreadable)
633
+
634
+ ### Challenge pages
635
+
636
+ **Not waited on.** Vision does not wait for a Cloudflare or Akamai challenge to pass, and never solves a CAPTCHA. A challenge comes back as `page_state` `captcha` or `blocked`, which is free under `walls: free`.
637
+
638
+ ### Walled pages in full Chrome
639
+
640
+ **On.** A page from the scrape pool that comes back a wall is read once more in a full Chrome browser of your organization's own, and that answer is used when it is not a wall; a warning says so. It adds time to a walled page and takes none of your `vision.sessions.concurrent` places. It is skipped when the request names `browser` or runs `actions`.
641
+
642
+ ### Model for structured data
643
+
644
+ **The node's default chat model.** The `json` format asks `b3os/default` (see [Infer](https://docs.beta.b3os.org/infer#models)) for at most 2,048 tokens per call, at most two calls per page. When no answer is JSON, the page comes back without `json` and with a warning.
645
+
646
+ - **Guide:** [Structured data](https://docs.beta.b3os.org/vision/scrape#structured-data)
647
+
648
+ ### Spacing between job pages
649
+
650
+ **250 ms per host.** Pages of batches and crawls to one host start at least 250 ms apart across every organization on the node, with at most 2 in flight for one organization and 2 for all. A crawl's `delay_ms` can only add to it. Single scrapes are not spaced.
651
+
652
+ ### Proxy on other surfaces
653
+
654
+ **Node address.** Batches, crawls, sessions and the Firecrawl surface leave from the node's own address. A session's CDP socket refuses a browser context with proxy settings of its own. The Firecrawl surface's `proxy: "enhanced"` and `"stealth"` answer `400 unsupported_option`.
655
+
656
+ - **Error:** [`400 unsupported_option`](https://docs.beta.b3os.org/errors#unsupported_option)