* feat: add Paperless NGX agent with robust error handling
- Implement ReAct agent for document management with Paperless NGX
- Add comprehensive error handling to prevent crashes on missing credentials
- Use global ServiceFactory singleton pattern for dependency injection
- Integrate edge helpers for error routing and retry logic
- Add user-friendly error messages when Paperless is not configured
- Support runtime configuration through RunnableConfig
- Include all Paperless tools (search, update, tags, correspondents, etc.)
- Add factory function for LangGraph API compatibility
- Ensure graceful degradation when credentials are missing
* Apply suggestions from code review
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* feat: enhance custom tool node for Paperless NGX with improved error handling
- Introduced ReActAgentState for better state management in custom tool node.
- Added explicit configuration validation and user-friendly error messages for missing Paperless NGX credentials.
- Enhanced logging for configuration usage and error reporting.
- Updated agent factory to ensure proper configuration handling for tool execution.
* fix: update and add files, resolve pre-commit and safe.directory issues
* chore: update project configurations and enhance documentation
- Added new commands to CLAUDE.local.md for formatting and type checking.
- Updated Makefile to use 'basedpyright' for linting instead of 'pyright'.
- Included 'pytest' as a new dependency in pyproject.toml.
- Cleaned up pyrightconfig.json by removing unnecessary stubPath.
- Deleted obsolete test_fixes_summary.md file.
- Introduced new test-failures.txt and type_errors.txt files for better error tracking.
- Added new devcontainer configuration files for improved development environment setup.
These changes collectively enhance project organization, improve documentation clarity, and streamline the development workflow.
* chore: add pre-commit as a dependency in pyproject.toml
- Included "pre-commit>=4.2.0" in the dependencies section of pyproject.toml to enhance code quality checks and maintainability.
* chore: update project configurations and enhance documentation
- Added new commands to CLAUDE.local.md for formatting and type checking.
- Updated Makefile to use `basedpyright` for linting instead of `pyright`.
- Included `pytest` as a dependency in pyproject.toml for testing.
- Cleaned up pyrightconfig.json by removing unnecessary stubPath.
- Deleted obsolete test_fixes_summary.md and added new test-failures.txt for tracking test failures.
- Introduced new devcontainer configuration files for improved development environment setup.
These changes collectively enhance project organization, improve testing capabilities, and provide clearer development guidelines.
* chore: update devcontainer configuration to include host .venv bind mount
- Added a bind mount for the host's .venv directory to the devcontainer configuration for shared access, avoiding conflicts with the existing .venv volume.
* chore: add pre-commit as a development dependency in pyproject.toml
- Included "pre-commit>=4.2.0" in the dev dependencies section of pyproject.toml to enhance code quality checks and maintainability.
* chore: remove obsolete basedpyright_output.json and update LLMConfig initialization
- Deleted the obsolete basedpyright_output.json file.
- Updated LLMConfig initialization in app.py to set a default profile using LLMProfile.LARGE for improved configuration management.
* fix: improve formatting and consistency in Paperless NGX client and tests
- Added missing newlines for better readability in paperless.py and test_paperless.py.
- Ensured consistent formatting in function calls and docstrings across the codebase.
- Enhanced clarity in custom field query examples within the documentation.
* fix: improve output formatting and assertions in crash tests
- Adjusted print statements in run_crash_tests.py for consistent newline usage.
- Enhanced assertions in test_concurrency_races.py to clarify expected behavior during concurrent operations.
- Improved readability of markdown output in summary reports.
* fix: refactor paperless_ngx_agent_factory to be asynchronous
- Changed paperless_ngx_agent_factory from a synchronous to an asynchronous function.
- Removed unnecessary nested asyncio handling and streamlined agent creation process.
- Updated comments for clarity regarding checkpointer usage.
* fix: resolve ruff linting errors
- Fix B027 errors by adding return statements to non-abstract ainit methods
- Fix E501 line length errors in embeddings.py
- Fix ANN204, D105, ANN202, ANN401 type annotation errors
- Add proper type annotations for __await__ and service_factory
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: update project configurations and enhance documentation
- Added examples directory to .pyreflyignore for improved file management.
- Updated Makefile to include new test_watch target for better testing workflow.
- Refined pyproject.toml and pyrightconfig.json for enhanced project configuration.
- Introduced new check_singletons.md documentation for clarity on singleton checks.
- Removed obsolete type_errors.txt file to streamline error tracking.
These changes collectively improve project organization, enhance documentation clarity, and refine testing processes.
* fix: enhance graph validation and improve type handling in extraction service
- Updated `validate_all_graphs` to handle coroutine functions more effectively and skip those requiring arguments.
- Improved type casting in `ComponentExtractor` to ensure proper handling of matches.
- Enhanced message handling in `call_model_node` to ensure proper indexing and debugging output.
- Refactored `scrape_status_summary_node` for clearer progress calculation and improved handling of R2R information.
- Streamlined error handling and type casting in `SemanticExtractionService` for better response processing.
- Improved test readability and structure in `test_check_duplicate_error_handling.py` with consistent patching style.
These changes collectively enhance the robustness and clarity of the validation and extraction processes.
* fix: improve scraper name validation in extraction orchestrator
- Updated validation for `scraper_name` in `extract_key_information` and `process_single_url` functions to ensure it is a string.
- Simplified logic to default to "beautifulsoup" if `scraper_name` is not a valid string.
These changes enhance the robustness of the extraction process by ensuring proper type handling for scraper names.
* fix: restore type safety in response formatting
- Updated `format_response_for_caller` to ensure `validation_issues_list` is a list of strings and refined URL extraction from sources.
- These changes enhance type safety and improve the robustness of response data handling.
* fix: enhance type safety in content validation and service factory
- Added type checks to `validate_content` and `preprocess_content` functions to ensure inputs are strings.
- Improved date validation in `count_recent_sources` to check for both presence and type.
- Updated condition for updating `llm_kwargs` in `ServiceFactory` to ensure `kwargs` is a dictionary.
These changes collectively enhance type safety and robustness in validation and service handling.
* fix: enhance type safety in content extraction and analysis
- Added comments to clarify that `extracted_content` and `catalog_metadata` are always dictionaries, improving type safety in `identify_component_focus_node`, `find_affected_catalog_items_node`, and `batch_analyze_components_node`.
- Simplified checks for `catalog_items` to ensure they are lists, enhancing robustness in handling extracted content.
These changes collectively improve type handling and clarity in the content extraction and analysis processes.
* Fix error handling for mixed error types in validation checks
Co-authored-by: travis.vas <travis.vas@gmail.com>
* fix: enhance type checking in URL filtering and human feedback processing
- Added type checks to ensure results are dictionaries in `filter_search_results` and human feedback functions.
- Improved robustness by skipping non-dictionary results, enhancing type safety in data handling.
These changes collectively improve type handling and clarity in the scraping and validation processes.
* fix: enhance type checking in configuration handling
- Updated `check_existing_content_node` and `store_processing_metadata` functions to check if `config` is an instance of `AppConfig` before validation.
- Improved type safety by ensuring that the correct type is used for `app_config`.
These changes collectively enhance type handling and robustness in configuration processing.
* fix: improve code readability and type safety in various nodes
- Refactored conditional expressions in multiple nodes to enhance readability and maintainability.
- Ensured consistent type handling for extracted content and configuration parameters across several functions.
- These changes collectively improve clarity and robustness in data processing and validation.
* fix: improve type safety in RouterConfig category and severity handling
- Refactored category and severity processing in RouterConfig to use direct enumeration instead of casting.
- Added type checks to raise errors for invalid types, enhancing robustness in configuration handling.
These changes collectively improve type safety and error handling in the RouterConfig class.
---------
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>