Skip to content

Staging - #259

Merged
suguanYang merged 15 commits into
stagingfrom
main
Aug 12, 2026
Merged

Staging#259
suguanYang merged 15 commits into
stagingfrom
main

Conversation

@suguanYang

Copy link
Copy Markdown
Contributor

No description provided.

EricNGOntos and others added 11 commits August 12, 2026 17:49
- Added support for tracking invisible text length in document agent features.
- Updated the `probe_page_features` and related functions to include metrics for both visible and invisible text.
- Improved documentation for clarity on text rendering modes and their impact on text metrics.

This change enhances the accuracy of text extraction and analysis in document processing.
- Deleted the `inspect.pages` tool from the document agent, streamlining the toolset.
- Updated prompts and decision-making logic to reflect the removal of the inspect action.
- Adjusted the planner and executor to handle legacy actions appropriately, ensuring compatibility with the new structure.
- Enhanced the sampling logic in the planner to include optional random page selection when extrema are not available.

This change simplifies the document profiling process and improves overall clarity in tool usage.
- Replaced the offset calibration method in `propose_shard_plan` with a new implementation from `structure_anchoring`.
- Consolidated TOC node extraction and hierarchy handling by integrating new functions for anchoring and offset calibration.
- Removed obsolete pruning logic for out-of-scope nodes, streamlining the skeleton extraction process.
- Enhanced the handling of TOC ranges and improved the overall clarity of the document agent's structure.

These changes improve the maintainability and efficiency of the document agent's processing logic.
- Updated budget parameters in `.env.example` files for both API and worker to support increased visual and calibration budgets.
- Introduced a new calibration stage in the `BudgetStage` and updated the `BudgetTracker` to accommodate the new calibration budget logic.
- Enhanced the `calibration` phase in various modules, including `loop.py`, `procedure.py`, and `service.py`, to improve the handling of offsets and visual stages.
- Refactored the `inspect_pages` tool to clarify budget limits and ensure proper handling of visual stages during inspections.

These changes improve the efficiency and accuracy of the calibration process within the document agent, allowing for better handling of visual budgets and offsets.
Co-authored-by: Cursor <cursoragent@cursor.com>
Drop arithmetic offset fallback and legacy page_locate budget so shard
planning only uses VLM-calibrated offsets, and reuse one collapse helper
across calibration and page_memory.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid early Timestamp/NaT stringification in postprocess_tb so sparse
datetime columns still render clean HTML without NaT leakage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Patch verify on the live anchoring globals and drop brittle SkeletonAnchor
isinstance checks so contract autouse rebinds cannot miss the mock.

Co-authored-by: Cursor <cursoragent@cursor.com>
feat: document agent calibration, structure anchoring, and probe metrics
fix: support ECS task role for S3 storage
Comment thread apps/worker/app/services/document_agent/agents/calibration/loop.py Fixed
Comment thread apps/worker/app/services/document_agent/agents/calibration/loop.py Fixed
@suguanYang
suguanYang merged commit ae33ce0 into staging Aug 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants