@gaiventures/pilotfish-mcp 0.1.73 → 0.1.75

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 (3) hide show
  1. package/README.md +3 -3
  2. package/cli.js +159 -129
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -162,15 +162,15 @@ other address.
162
162
  | --- | --- |
163
163
  | `browser_navigate` `{url, snapshot?, expect?, escalate?}` | Open an http(s) URL and return what happened plus the visible screen, with counts of what is above and below. `snapshot: false` returns the start of the page's readable text (about 3,000 characters, main content first, as `browser_get_text` reads it) in place of the screen, with where it landed, the title, loading notes and anything that needs a person: for a page you will read or leave for another URL (`browser_get_text` reads on from where it stops; a page that fails to load is said in its own lines, without the failure page's details); keep the default for a page you will click, type or choose on. For cheapest, latest, highest-rated and the like it asks for the site's own sort or tab to be opened (a label naming its best value is not the list), the answer to say which sort, tab and filters it came from, and ties broken only by what the task asks; when that order does not rank by the task's measure over everything inside its bounds, the answer says how much was read and calls its pick the best of those read, not the best. Search, sort and filter addresses may be built from the task's words or by changing a parameter the site has shown (`browser_query` gives a link's full href), its page number included; a search the site's form takes several steps for (a place, dates, guests, a sort, filters) is usually one call as such an address. Before their results are used, the page must show what was meant applied (heading, breadcrumb, selected sort or filter, the results themselves; never the address or a search box, which can repeat a value the site ignored), else the site's own form is used or the answer says what could not be applied. Sign-in, session, account, identity and tracking values are never written, only kept as the site gave them or left out. |
164
164
  | `browser_snapshot` `{whole_page?}` | The page as a compact outline with refs (`[e12]<button>Search`): about three screens around the viewport, or all of it with `whole_page`. Every word and ref is kept; repeated text, closing tags and generated ids are left out. A plain table row is one line, its cells between `|`. A tag marked `@` is an element the page gave that ARIA role (`<@button>` is a div or span with `role="button"`, not a native `<button>`); the same notation is used in every tool's screen, evidence and find lines. Under a list of suggestions in which two options share a name, a line says they are different places. |
165
- | `browser_click` `{ref, snapshot?, expect?, escalate?}` | Click an element. Refused if it is covered, stale or not visible. A tab or menu item not already selected waits up to 6 seconds for the lists on screen to change, and the reply says so when they did not (a list may still show the earlier order). In a list of suggestions, an option listed below another of the same name is not clicked the first time: the reply names the one above, and clicking it again goes through. |
165
+ | `browser_click` `{ref, snapshot?, expect?, escalate?}` | Click an element. Refused, with the reason, if it is covered, stale or not shown (no size, hidden, or inside a collapsed section or a closed `<details>`), before anything scrolls. A tab or menu item not already selected waits up to 6 seconds for the lists on screen to change, and the reply says so when they did not (a list may still show the earlier order). In a list of suggestions, an option listed below another of the same name is not clicked the first time: the reply names the one above, and clicking it again goes through. |
166
166
  | `browser_type` `{ref, text, submit?, snapshot?, expect?, escalate?}` | Replace a field's text. A text field is clicked first (or focused when the click cannot reach it), so a click on it just before is usually not needed; a native date, time, month, week, color or range input gets its value set directly, with no click. `{{name}}` types a configured secret. A field a popup covers gets the popup closed and is typed once more. |
167
167
  | `browser_select` `{ref, values, snapshot?, expect?, escalate?}` | Pick `<select>` options by label or value. |
168
168
  | `browser_press` `{key, snapshot?, expect?, escalate?}` | Press a key or shortcut (`Enter`, `Escape`, `Control+a`). |
169
169
  | `browser_scroll` `{direction, snapshot?}` | Scroll about one screen and return it. |
170
170
  | `browser_actions` `{actions, snapshot?}` | Up to 10 steps in one call, such as a form's fields and its submit button. Each step is `{action, …}`: `click`, `type`, `select`, `press`, `scroll` or `wait`, with the same fields as its own tool. A malformed step stops the batch before anything runs; otherwise it stops at the first step that fails or moves to another page, and after a step that raised a dialog, opened a new tab, had a server write refused or unanswered, left the page still loading, or left a check or sign-in on the page. Each earlier step's line keeps what it did that must not be lost (dialogs, new tab, refused writes, invalid fields, choices, field read-back). When an earlier step changed the page, the page is printed even if the last step changed nothing. |
171
171
  | `browser_query` `{expression, schema?}` | Read values with a JavaScript expression that returns JSON (up to 4,000 characters): a list of results, prices, counts. It cannot click, type, submit or send data. The cheapest way to read a page. An object written as the whole expression (`{a: 1}`) is read as if in parentheses. With `schema` (a JSON Schema), the result is checked against it: a match also comes back as `structuredContent: {value}`, a mismatch as an error starting `ERROR schema_mismatch` with up to 5 `path: message` lines. |
172
- | `browser_find` `{query}` | Find elements anywhere on the page by their words, best match first. Separate several targets with commas. |
173
- | `browser_get_text` `{url?, max_chars?, offset?, mode?, selector?}` | With `url`, opens that page first and reads it in the same call (the page already open at exactly that address is read where it is, not loaded again; a page that fails to load is reported in a few lines starting `NOT READ:`, what happened and what to do, without the failure page's details). The readable text of the page (PDFs too), main content first, lists as `- ` lines and table rows as `| a | b |`, with secrets masked; or of one element (`main`, `#results`). Up to `max_chars` (default 8,000): a longer page says which characters it gave and where the rest starts, read on with `offset`. `mode: "links"` lists only the page's links, one a line. Reading the same page again unchanged returns one line saying so, not the text again. A `selector` that matches nothing returns the page's whole text, saying so. |
172
+ | `browser_find` `{query}` | Find elements anywhere on the page by their words, best match first; a match inside a collapsed part of the page comes after the shown ones, marked `(hidden: in a collapsed part of the page)`. Separate several targets with commas. |
173
+ | `browser_get_text` `{url?, max_chars?, offset?, mode?, selector?}` | With `url`, opens that page first and reads it in the same call (the page already open at exactly that address is read where it is, not loaded again; a page that fails to load is reported in a few lines starting `NOT READ:`, what happened and what to do, without the failure page's details). The readable text of the page (PDFs too), main content first, lists as `- ` lines and table rows as `| a | b |`, with secrets masked; or of one element (`main`, `#results`). Up to `max_chars` (default 8,000): a longer page says which characters it gave and where the rest starts, read on with `offset`, and its last part says `the end` (only whitespace left counts as none). `mode: "links"` lists only the page's links, one a line. Reading the same page again unchanged returns one line saying so, not the text again. A `selector` that matches nothing returns the page's whole text, saying so. |
174
174
  | `browser_screenshot` `{}` | A JPEG of the viewport. Off when secrets are configured, since the image could show them, and withheld (`UNSAFE_OUTPUT`) once a password was typed into a password field in this browser, whose pixels cannot be checked for it. |
175
175
  | `browser_wait` `{seconds, until?, gone?, in?, snapshot?}` | Wait up to 0.5 to 10 seconds, then return what changed. With `until` or `gone` it returns the moment that text appears on the page or goes (a result's label, the site's "Calculating…"). Actions already wait for the requests they start, for answers a page gets over its own WebSocket, and for a loading line or countdown the site shows. |
176
176
  | `browser_resume` `{timeout_s?}` | After a result said `NEEDS A PERSON`: wait (default 300 s) until you have dealt with the page, then return it. |