xberg 1.2.9 → 1.3.0

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.
data/lib/xberg/version.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:af0361b6e9fb7d4844fed422cc5ad28ac7fdea52beb041fa1a3ab043aec2d450
2
+ # alef:hash:05ecab5f3a98752913f33a49a0d8e2003efdf37c21a36463c366e780e9f9f882
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
  # frozen_string_literal: true
6
6
 
7
7
  module Xberg
8
8
  ## The version string for this package.
9
- VERSION = "1.2.9"
9
+ VERSION = "1.3.0"
10
10
  end
data/sig/types.rbs CHANGED
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:060fee672abbcdc0cf88ae2c4c85dc76420919f28c17b4cd7ccbd449f6d319b1
2
+ # alef:hash:04f362999b06cc48b7e517b58690ed05ddc13831ae9ef1b20fac65475ac1f94e
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
@@ -96,6 +96,8 @@ def initialize: (?entry_count: Integer, ?citation_keys: Array[String], ?authors:
96
96
  attr_reader backend: enum_BrowserBackend
97
97
  attr_reader endpoint: String?
98
98
  attr_reader timeout: Integer
99
+ attr_reader overall_timeout: Integer
100
+ attr_reader shutdown_timeout: Integer
99
101
  attr_reader wait: enum_BrowserWait
100
102
  attr_reader wait_selector: String?
101
103
  attr_reader extra_wait: Integer?
@@ -106,7 +108,7 @@ def initialize: (?entry_count: Integer, ?citation_keys: Array[String], ?authors:
106
108
  attr_reader capture_network_events: bool
107
109
  attr_reader session_affinity: bool
108
110
 
109
- def initialize: (?mode: enum_BrowserMode, ?backend: enum_BrowserBackend, ?endpoint: String, ?timeout: Integer, ?wait: enum_BrowserWait, ?wait_selector: String, ?extra_wait: Integer, ?proxy: ProxyConfig, ?block_url_patterns: Array[String], ?eval_script: String, ?robots_user_agent: String, ?capture_network_events: bool, ?session_affinity: bool) -> void
111
+ def initialize: (?mode: enum_BrowserMode, ?backend: enum_BrowserBackend, ?endpoint: String, ?timeout: Integer, ?overall_timeout: Integer, ?shutdown_timeout: Integer, ?wait: enum_BrowserWait, ?wait_selector: String, ?extra_wait: Integer, ?proxy: ProxyConfig, ?block_url_patterns: Array[String], ?eval_script: String, ?robots_user_agent: String, ?capture_network_events: bool, ?session_affinity: bool) -> void
110
112
  end
111
113
 
112
114
  class CacheStats
@@ -297,8 +299,9 @@ def initialize: (?chunks: Array[CodeChunkInfo], ?data: CodeDataNode) -> void
297
299
  attr_reader wrap: bool
298
300
  attr_reader wrap_width: Integer
299
301
  attr_reader include_document_structure: bool
302
+ attr_reader extract_metadata: bool
300
303
 
301
- def initialize: (?output_format: String, ?preprocessing_preset: String, ?remove_navigation: bool, ?remove_forms: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?exclude_selectors: Array[String], ?skip_images: bool, ?max_depth: Integer, ?wrap: bool, ?wrap_width: Integer, ?include_document_structure: bool) -> void
304
+ def initialize: (?output_format: String, ?preprocessing_preset: String, ?remove_navigation: bool, ?remove_forms: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?exclude_selectors: Array[String], ?skip_images: bool, ?max_depth: Integer, ?wrap: bool, ?wrap_width: Integer, ?include_document_structure: bool, ?extract_metadata: bool) -> void
302
305
  end
303
306
 
304
307
  class ContentFilterConfig
@@ -362,8 +365,9 @@ def initialize: (?output_format: String, ?preprocessing_preset: String, ?remove_
362
365
  attr_reader max_depth: Integer?
363
366
  attr_reader exclude_selectors: Array[String]
364
367
  attr_reader tier_strategy: enum_TierStrategy
368
+ attr_reader base_url: String?
365
369
 
366
- def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptions, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_HtmlToMarkdownRsOutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer, ?exclude_selectors: Array[String], ?tier_strategy: enum_TierStrategy) -> void
370
+ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptions, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_HtmlToMarkdownRsOutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer, ?exclude_selectors: Array[String], ?tier_strategy: enum_TierStrategy, ?base_url: String) -> void
367
371
  end
368
372
 
369
373
  class CoreProperties
@@ -402,12 +406,19 @@ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_List
402
406
  attr_reader allow_subdomains: bool
403
407
  attr_reader include_paths: Array[String]
404
408
  attr_reader exclude_paths: Array[String]
409
+ attr_reader path_patterns_match_query: bool
410
+ attr_reader dedup_include_query: bool
411
+ attr_reader strip_tracking_params: bool
412
+ attr_reader tracking_params: Array[String]
405
413
  attr_reader custom_headers: Hash[String, String]
406
414
  attr_reader request_timeout: Integer
407
415
  attr_reader rate_limit_ms: Integer?
408
416
  attr_reader max_redirects: Integer
409
417
  attr_reader retry_count: Integer
410
418
  attr_reader retry_codes: Array[Integer]
419
+ attr_reader retry_initial_delay_ms: Integer
420
+ attr_reader retry_max_delay_ms: Integer
421
+ attr_reader rate_limit_jitter_ratio: Float
411
422
  attr_reader cookies_enabled: bool
412
423
  attr_reader auth: AuthConfig?
413
424
  attr_reader max_body_size: Integer?
@@ -435,7 +446,7 @@ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_List
435
446
  attr_reader ssrf: SsrfPolicy
436
447
  attr_reader ssrf_deny_private_explicit: bool?
437
448
 
438
- def initialize: (?max_depth: Integer, ?max_pages: Integer, ?max_links_per_page: Integer, ?max_concurrent: Integer, ?crawl_strategy: enum_CrawlStrategyKind, ?content_filter: enum_ContentFilterKind, ?bm25_query: String, ?bm25_threshold: Float, ?respect_robots_txt: bool, ?soft_http_errors: bool, ?user_agent: String, ?stay_on_domain: bool, ?allow_subdomains: bool, ?include_paths: Array[String], ?exclude_paths: Array[String], ?custom_headers: Hash[String, String], ?request_timeout: Integer, ?rate_limit_ms: Integer, ?max_redirects: Integer, ?retry_count: Integer, ?retry_codes: Array[Integer], ?cookies_enabled: bool, ?auth: AuthConfig, ?max_body_size: Integer, ?remove_tags: Array[String], ?content: ContentConfig, ?map_limit: Integer, ?map_search: String, ?download_assets: bool, ?asset_types: Array[enum_AssetCategory], ?max_asset_size: Integer, ?browser: BrowserConfig, ?proxy: ProxyConfig, ?user_agents: Array[String], ?capture_screenshot: bool, ?follow_document_urls: bool, ?document_url_depth: Integer, ?download_documents: bool, ?document_max_size: Integer, ?document_mime_types: Array[String], ?document_output_dir: String, ?document_content_encoding: enum_DocumentContentEncoding, ?warc_output: String, ?browser_profile: String, ?save_browser_profile: bool, ?ssrf: SsrfPolicy, ?ssrf_deny_private_explicit: bool) -> void
449
+ def initialize: (?max_depth: Integer, ?max_pages: Integer, ?max_links_per_page: Integer, ?max_concurrent: Integer, ?crawl_strategy: enum_CrawlStrategyKind, ?content_filter: enum_ContentFilterKind, ?bm25_query: String, ?bm25_threshold: Float, ?respect_robots_txt: bool, ?soft_http_errors: bool, ?user_agent: String, ?stay_on_domain: bool, ?allow_subdomains: bool, ?include_paths: Array[String], ?exclude_paths: Array[String], ?path_patterns_match_query: bool, ?dedup_include_query: bool, ?strip_tracking_params: bool, ?tracking_params: Array[String], ?custom_headers: Hash[String, String], ?request_timeout: Integer, ?rate_limit_ms: Integer, ?max_redirects: Integer, ?retry_count: Integer, ?retry_codes: Array[Integer], ?retry_initial_delay_ms: Integer, ?retry_max_delay_ms: Integer, ?rate_limit_jitter_ratio: Float, ?cookies_enabled: bool, ?auth: AuthConfig, ?max_body_size: Integer, ?remove_tags: Array[String], ?content: ContentConfig, ?map_limit: Integer, ?map_search: String, ?download_assets: bool, ?asset_types: Array[enum_AssetCategory], ?max_asset_size: Integer, ?browser: BrowserConfig, ?proxy: ProxyConfig, ?user_agents: Array[String], ?capture_screenshot: bool, ?follow_document_urls: bool, ?document_url_depth: Integer, ?download_documents: bool, ?document_max_size: Integer, ?document_mime_types: Array[String], ?document_output_dir: String, ?document_content_encoding: enum_DocumentContentEncoding, ?warc_output: String, ?browser_profile: String, ?save_browser_profile: bool, ?ssrf: SsrfPolicy, ?ssrf_deny_private_explicit: bool) -> void
439
450
  end
440
451
 
441
452
  class CsvConfig
@@ -1319,8 +1330,9 @@ def initialize: (src: String, ?alt: String, ?title: String, ?dimensions: ImageDi
1319
1330
  attr_reader contrast_enhance: bool
1320
1331
  attr_reader binarization_method: String
1321
1332
  attr_reader invert_colors: bool
1333
+ attr_reader normalize_shaded_rows: bool
1322
1334
 
1323
- def initialize: (?target_dpi: Integer, ?auto_rotate: bool, ?deskew: bool, ?denoise: bool, ?contrast_enhance: bool, ?binarization_method: String, ?invert_colors: bool) -> void
1335
+ def initialize: (?target_dpi: Integer, ?auto_rotate: bool, ?deskew: bool, ?denoise: bool, ?contrast_enhance: bool, ?binarization_method: String, ?invert_colors: bool, ?normalize_shaded_rows: bool) -> void
1324
1336
  end
1325
1337
 
1326
1338
  class ImagePreprocessingMetadata
@@ -1692,8 +1704,9 @@ def initialize: (name: String, supported_languages: Array[String]) -> void
1692
1704
  attr_reader security_limits: SecurityLimits?
1693
1705
  attr_reader tessdata_bytes: Hash[String, String]?
1694
1706
  attr_reader tessdata_path: String?
1707
+ attr_reader numeric_repair: bool
1695
1708
 
1696
- def initialize: (?enabled: bool, ?backend: String, ?language: Array[String], ?tesseract_config: TesseractConfig, ?output_format: OutputFormat, ?paddle_ocr_config: String, ?backend_options: String, ?element_config: OcrElementConfig, ?quality_thresholds: OcrQualityThresholds, ?pipeline: OcrPipelineConfig, ?auto_rotate: bool, ?vlm_fallback: VlmFallbackPolicy, ?vlm_config: LlmConfig, ?vlm_prompt: String, ?acceleration: AccelerationConfig, ?security_limits: SecurityLimits, ?tessdata_bytes: Hash[String, String], ?tessdata_path: String) -> void
1709
+ def initialize: (?enabled: bool, ?backend: String, ?language: Array[String], ?tesseract_config: TesseractConfig, ?output_format: OutputFormat, ?paddle_ocr_config: String, ?backend_options: String, ?element_config: OcrElementConfig, ?quality_thresholds: OcrQualityThresholds, ?pipeline: OcrPipelineConfig, ?auto_rotate: bool, ?vlm_fallback: VlmFallbackPolicy, ?vlm_config: LlmConfig, ?vlm_prompt: String, ?acceleration: AccelerationConfig, ?security_limits: SecurityLimits, ?tessdata_bytes: Hash[String, String], ?tessdata_path: String, ?numeric_repair: bool) -> void
1697
1710
  end
1698
1711
 
1699
1712
  class OcrElement
@@ -2538,9 +2551,9 @@ def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> voi
2538
2551
  attr_reader tessedit_char_blacklist: String
2539
2552
  attr_reader tessedit_use_primary_params_model: bool
2540
2553
  attr_reader textord_space_size_is_variable: bool
2541
- attr_reader thresholding_method: bool
2554
+ attr_reader thresholding_method: Integer
2542
2555
 
2543
- def initialize: (?language: Array[String], ?psm: Integer, ?output_format: String, ?oem: Integer, ?min_confidence: Float, ?preprocessing: ImagePreprocessingConfig, ?enable_table_detection: bool, ?table_min_confidence: Float, ?table_column_threshold: Integer, ?table_row_threshold_ratio: Float, ?use_cache: bool, ?classify_use_pre_adapted_templates: bool, ?language_model_ngram_on: bool, ?tessedit_dont_blkrej_good_wds: bool, ?tessedit_dont_rowrej_good_wds: bool, ?tessedit_enable_dict_correction: bool, ?tessedit_char_whitelist: String, ?tessedit_char_blacklist: String, ?tessedit_use_primary_params_model: bool, ?textord_space_size_is_variable: bool, ?thresholding_method: bool) -> void
2556
+ def initialize: (?language: Array[String], ?psm: Integer, ?output_format: String, ?oem: Integer, ?min_confidence: Float, ?preprocessing: ImagePreprocessingConfig, ?enable_table_detection: bool, ?table_min_confidence: Float, ?table_column_threshold: Integer, ?table_row_threshold_ratio: Float, ?use_cache: bool, ?classify_use_pre_adapted_templates: bool, ?language_model_ngram_on: bool, ?tessedit_dont_blkrej_good_wds: bool, ?tessedit_dont_rowrej_good_wds: bool, ?tessedit_enable_dict_correction: bool, ?tessedit_char_whitelist: String, ?tessedit_char_blacklist: String, ?tessedit_use_primary_params_model: bool, ?textord_space_size_is_variable: bool, ?thresholding_method: Integer) -> void
2544
2557
  end
2545
2558
 
2546
2559
  class TextAnnotation
@@ -2997,6 +3010,8 @@ def self.list_embedding_backends: () -> Array[String]
2997
3010
 
2998
3011
  def self.list_ocr_backend_capabilities: () -> Array[OcrBackendCapabilities]
2999
3012
 
3013
+ def self.list_ocr_backend_capabilities_for: (OcrConfig config) -> Array[OcrBackendCapabilities]
3014
+
3000
3015
  def self.list_ocr_backends: () -> Array[String]
3001
3016
 
3002
3017
  def self.list_post_processors: () -> Array[String]
@@ -3019,6 +3034,10 @@ def self.max_sim_score: (json_value query, json_value doc) -> Float
3019
3034
 
3020
3035
  def self.ocr_backend_supports_language: (String backend, String language) -> bool
3021
3036
 
3037
+ def self.ocr_backend_supports_language_for: (String backend, String language, OcrConfig config) -> bool
3038
+
3039
+ def self.pdf_page_count: (String pdf_bytes, ?String password) -> Integer
3040
+
3022
3041
  def self.register_document_extractor: (_DocumentExtractor extractor) -> void
3023
3042
 
3024
3043
  def self.register_renderer: (_Renderer renderer) -> void
@@ -3031,7 +3050,7 @@ def self.verify_excerpt: (String excerpt, String source_text) -> bool
3031
3050
 
3032
3051
  interface _OcrBackend
3033
3052
  # Optional methods the bridge calls when the object defines them (the
3034
- # trait's Rust default behavior applies otherwise): process_image_file, supported_languages, supports_table_detection, supports_document_processing, emits_structured_markdown, confidence_semantics, page_orientation_handling, process_document.
3053
+ # trait's Rust default behavior applies otherwise): process_image_file, supported_languages, supported_languages_for, supports_language_for, supports_table_detection, supports_document_processing, emits_structured_markdown, confidence_semantics, page_orientation_handling, process_document.
3035
3054
  # The lifecycle hooks `initialize`/`shutdown` are likewise optional (note:
3036
3055
  # Ruby constructors are private and never count as the lifecycle hook).
3037
3056
  def process_image: (String image_bytes, OcrConfig config) -> ExtractedDocument
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xberg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Na'aman Hirschfeld <naaman@xberg.io>
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-24 00:00:00.000000000 Z
11
+ date: 2026-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys