Commit Graph

59 Commits

Author SHA1 Message Date
Saurav Panda ad8f3a4dd7 feat(tools): print page metadata in save_as_pdf header/footer
The save_as_pdf action now renders page metadata into the PDF margins by
default, matching Chrome's Print dialog: the date in the header and the page
URL plus page numbers in the footer.

- Add display_header_footer (default True), header_template, and
  footer_template params to SaveAsPdfAction.
- Pass displayHeaderFooter + header/footer templates and explicit margins to
  CDP Page.printToPDF so the metadata has room to render (Chrome clips it
  otherwise, and defaults header/footer font-size to 0px).
- Default templates show the date / URL + page numbers; callers can override
  with custom HTML or disable entirely for a clean PDF.
2026-06-11 08:29:41 +05:30
Laith Weinberger 4476f6e16e fix input clear fallbacks and clarify clear-then-type behavior 2026-04-15 17:31:04 -04:00
Saurav Panda cc1cf2b1c7 Merge branch 'main' into fix-image-url-stripping 2026-03-19 15:34:27 -07:00
Saurav Panda 9445a9ff9e fix image URLs stripped from extracted markdown 2026-03-19 15:29:06 -07:00
Saurav Panda cb75bf846a Merge branch 'main' into fix-compaction-hallucination 2026-03-18 17:54:14 -07:00
Saurav Panda cc3cc8fea7 Merge branch 'main' into fix-done-action-hallucination 2026-03-18 16:11:31 -07:00
Saurav Panda 179d526786 added better data grounding in done action 2026-03-18 16:08:00 -07:00
Saurav Panda 0dea9480ee Merge branch 'main' into fix-compaction-hallucination 2026-03-17 15:43:11 -07:00
Saurav Panda 02349f1d9c fix: prevent compaction hallucination 2026-03-17 15:39:35 -07:00
Saurav Panda 73d64d7bb5 remove read long content action 2026-03-12 12:44:10 -07:00
Saurav Panda ce25884751 fix: prevent duplicate items in multi-page extraction via already_collected parameter 2026-03-10 16:12:46 -07:00
Saurav Panda 95215d6211 Add save_as_pdf agent action for CDP-based page-to-PDF export 2026-02-24 18:35:34 -08:00
Saurav Panda c18ee5412f add file atttachments to structured output. 2026-02-19 12:43:05 -08:00
Laith Weinberger 04da1fd30c strip success from JSON schema so invisible to the LLM, avoiding confusion 2026-02-05 16:49:36 -05:00
Laith Weinberger 38fb5b12df Merge remote-tracking branch 'origin/main' into feat/smart-pdf-reading 2026-02-03 14:15:49 -05:00
Saurav Panda ba68695d65 Merge branch 'main' into schema-enforced-extraction 2026-01-31 22:47:48 -08:00
Saurav Panda d5f38a5eeb add grep tool to agent 2026-01-31 19:48:22 -08:00
Saurav Panda 7c4220845e fix: hide output_schema from JSON schema to fix Gemini INVALID_ARGUMENT
Gemini rejects OBJECT types with no properties in the response schema.
The output_schema field (dict | None) produced exactly that. Since this
field is only used programmatically, wrap it with SkipJsonSchema to
exclude it from the generated JSON schema while keeping it functional.
2026-01-31 17:45:44 -08:00
Saurav Panda 69004dda09 schema enforcement in extract tool 2026-01-31 17:41:42 -08:00
Laith Weinberger 7a1b76a5f0 bug fixes + lint 2026-01-31 19:03:23 -05:00
Laith Weinberger 556ecd93ab search_content and read_long_content actions for long webpages and files
Made read_file smarter for PDFs - instead of just reading the first 20 pgs, it reads up to 60k chars and uses IDF scoring to prioritize pgs w unique content
2026-01-31 18:50:44 -05:00
Laith Weinberger a81a493794 added optional file_name param to ss action
so it can return path if it needs; resolves 833 failures where agents tried write_file with .png and got rejected
2026-01-31 15:52:15 -05:00
Magnus Müller c4b9710a84 Less priming for scroll 2026-01-10 18:33:17 -08:00
nitesh-77 bd6c1d76e2 style: use single quotes to satisfy ruff formatter 2025-12-23 06:06:33 +05:30
nitesh-77 d17f10fe45 fix: use str | None type hint to satisfy linter 2025-12-23 06:00:22 +05:30
nitesh-77 285995ecce fix: resolve Gemini API error on empty action schemas 2025-12-23 05:48:12 +05:30
mertunsall 20247d5c56 make coordinates optionally available 2025-12-12 14:26:13 -08:00
mertunsall aa0d1fb00f get rid of force 2025-11-30 11:46:48 -08:00
Mert Unsal 02cf38e864 Revert "allowing MUCH MORE with coordinates" 2025-11-28 04:00:22 -08:00
mertunsall 46cb1a0ae1 allowing MUCH MORE with coordinates 2025-11-27 14:48:23 -08:00
Cursor Agent 36b2b93d9b Replace broken mouse click with ClickCoordinateEvent
- Add ClickCoordinateEvent to handle coordinate-based clicking via CDP
- Replace broken page.mouse.click() with CDP Input.dispatchMouseEvent
- Add safety checks for file inputs, select elements, and print dialogs
- Add get_dom_element_at_coordinates() to BrowserSession for element detection
- Add force parameter to ClickElementAction to optionally skip safety checks
- Update _click_by_coordinate to dispatch ClickCoordinateEvent instead of using mouse

This fixes coordinate clicking functionality by using CDP directly instead of
the broken Actor mouse object, matching the implementation from mert/everything_coordinates.
2025-11-24 19:55:48 +00:00
Utkarsh a6a557442f fix: Add default=True to ScrollAction.down field to handle LLM responses missing the field
- Fixes validation error when LLM returns {'scroll': {'pages': 3}} without 'down' field
- Defaults to True (scroll down) when 'down' is missing, which is the most common case
- Still supports explicit down=False for scrolling up
- Also fixes CDP client compatibility with older cdp-use versions by making max_ws_frame_size optional

Fixes validation errors with AWS Bedrock Claude and Gemini models
2025-11-16 22:27:58 +05:30
mertunsall 1e3a36dbce revert extract changes 2025-11-11 15:01:25 -08:00
mertunsall e5df80a0d6 flatten the extract action and some small things 2025-11-08 10:02:15 -08:00
Mert Unsal bc7b353316 Merge branch 'main' into mert/click_by_coordinate 2025-11-01 14:00:09 -07:00
mertunsall 4dca53282c add clicking by coordinate 2025-11-01 13:58:15 -07:00
Magnus Müller cc89c37669 Include index desc for click 2025-10-30 10:13:49 -07:00
Magnus Müller 1383604961 better descripiton for extract 2025-10-29 17:21:15 -07:00
Magnus Müller 191e0a91ed Message update 2025-10-27 21:48:17 -07:00
Magnus Müller 6098685bca Enhance documentation for file writing action and improve field descriptions
- Updated the `write_file` action to include detailed documentation on supported file formats (.txt, .md, .json, .jsonl, .csv, .pdf) and conversion process for PDF files.
- Refined the `text` field description in `DoneAction` to clarify the expected format for user summaries.
- Improved the `success` field description in `StructuredOutputAction` to specify its meaning more clearly.

These changes aim to enhance clarity and usability for developers interacting with the API.
2025-10-27 21:46:47 -07:00
Magnus Müller 9caa248316 Merge code7 branch changes 2025-10-21 18:55:54 -07:00
Magnus Müller 4078b6e265 Remove while_holding_ctrl logic in click 2025-10-12 16:11:09 -07:00
Magnus Müller 78b53a34b7 update tools 2025-10-08 22:16:41 -07:00
Magnus Müller 0fb1c73abc Remove ge=1 2025-10-05 21:47:57 -07:00
Magnus Müller 586dcc0a82 Input index can be 0 2025-10-05 19:00:33 -07:00
Magnus Müller 84b07cce8c Update parameter dict 2025-10-05 15:24:37 -07:00
Magnus Müller 50f97000e4 file parameter naming 2025-10-05 13:21:14 -07:00
Magnus Müller ae3b2a5926 Remove descripitons 2025-10-05 13:06:19 -07:00
Magnus Müller ad9b174762 Fix param 2025-10-05 12:18:21 -07:00
Magnus Müller 18b7dd95a4 Fix param 2025-10-05 12:16:13 -07:00