kreuzberg 4.6.3-aarch64-linux → 4.7.2-aarch64-linux

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/sig/kreuzberg.rbs CHANGED
@@ -91,6 +91,123 @@ module Kreuzberg
91
91
  def serialize: () -> Hash[Symbol, untyped]
92
92
  end
93
93
 
94
+ # CSV format metadata (T::Struct from types.rb)
95
+ class CsvMetadata
96
+ attr_reader row_count: Integer
97
+ attr_reader column_count: Integer
98
+ attr_reader delimiter: String?
99
+ attr_reader has_header: bool
100
+ attr_reader column_types: Array[String]?
101
+
102
+ def initialize: (row_count: Integer, column_count: Integer, delimiter: String?, has_header: bool, column_types: Array[String]?) -> void
103
+ def to_h: () -> Hash[Symbol, untyped]
104
+ end
105
+
106
+ # Year range for citation metadata (T::Struct from types.rb)
107
+ class YearRange
108
+ attr_reader min: Integer?
109
+ attr_reader max: Integer?
110
+ attr_reader years: Array[Integer]
111
+
112
+ def initialize: (min: Integer?, max: Integer?, years: Array[Integer]) -> void
113
+ def to_h: () -> Hash[Symbol, untyped]
114
+ end
115
+
116
+ # BibTeX format metadata (T::Struct from types.rb)
117
+ class BibtexMetadata
118
+ attr_reader entry_count: Integer
119
+ attr_reader citation_keys: Array[String]
120
+ attr_reader authors: Array[String]
121
+ attr_reader year_range: YearRange?
122
+ attr_reader entry_types: Hash[String, Integer]?
123
+
124
+ def initialize: (entry_count: Integer, citation_keys: Array[String], authors: Array[String], year_range: YearRange?, entry_types: Hash[String, Integer]?) -> void
125
+ def to_h: () -> Hash[Symbol, untyped]
126
+ end
127
+
128
+ # Citation format metadata (T::Struct from types.rb)
129
+ class CitationMetadata
130
+ attr_reader citation_count: Integer
131
+ attr_reader format: String?
132
+ attr_reader authors: Array[String]
133
+ attr_reader year_range: YearRange?
134
+ attr_reader dois: Array[String]
135
+ attr_reader keywords: Array[String]
136
+
137
+ def initialize: (citation_count: Integer, format: String?, authors: Array[String], year_range: YearRange?, dois: Array[String], keywords: Array[String]) -> void
138
+ def to_h: () -> Hash[Symbol, untyped]
139
+ end
140
+
141
+ # FictionBook format metadata (T::Struct from types.rb)
142
+ class FictionBookMetadata
143
+ attr_reader genres: Array[String]
144
+ attr_reader sequences: Array[String]
145
+ attr_reader annotation: String?
146
+
147
+ def initialize: (genres: Array[String], sequences: Array[String], annotation: String?) -> void
148
+ def to_h: () -> Hash[Symbol, untyped]
149
+ end
150
+
151
+ # DBF field information (T::Struct from types.rb)
152
+ class DbfFieldInfo
153
+ attr_reader name: String
154
+ attr_reader field_type: String
155
+
156
+ def initialize: (name: String, field_type: String) -> void
157
+ def to_h: () -> Hash[Symbol, untyped]
158
+ end
159
+
160
+ # DBF format metadata (T::Struct from types.rb)
161
+ class DbfMetadata
162
+ attr_reader record_count: Integer
163
+ attr_reader field_count: Integer
164
+ attr_reader fields: Array[DbfFieldInfo]
165
+
166
+ def initialize: (record_count: Integer, field_count: Integer, fields: Array[DbfFieldInfo]) -> void
167
+ def to_h: () -> Hash[Symbol, untyped]
168
+ end
169
+
170
+ # Contributor with role (T::Struct from types.rb)
171
+ class ContributorRole
172
+ attr_reader name: String
173
+ attr_reader role: String?
174
+
175
+ def initialize: (name: String, role: String?) -> void
176
+ def to_h: () -> Hash[Symbol, untyped]
177
+ end
178
+
179
+ # JATS format metadata (T::Struct from types.rb)
180
+ class JatsMetadata
181
+ attr_reader copyright: String?
182
+ attr_reader license: String?
183
+ attr_reader history_dates: Hash[String, String]
184
+ attr_reader contributor_roles: Array[ContributorRole]
185
+
186
+ def initialize: (copyright: String?, license: String?, history_dates: Hash[String, String], contributor_roles: Array[ContributorRole]) -> void
187
+ def to_h: () -> Hash[Symbol, untyped]
188
+ end
189
+
190
+ # EPUB format metadata (T::Struct from types.rb)
191
+ class EpubMetadata
192
+ attr_reader coverage: String?
193
+ attr_reader dc_format: String?
194
+ attr_reader relation: String?
195
+ attr_reader source: String?
196
+ attr_reader dc_type: String?
197
+ attr_reader cover_image: String?
198
+
199
+ def initialize: (coverage: String?, dc_format: String?, relation: String?, source: String?, dc_type: String?, cover_image: String?) -> void
200
+ def to_h: () -> Hash[Symbol, untyped]
201
+ end
202
+
203
+ # PST format metadata (T::Struct from types.rb)
204
+ class PstMetadata
205
+ attr_reader message_count: Integer
206
+
207
+ def initialize: (message_count: Integer) -> void
208
+ def to_h: () -> Hash[Symbol, untyped]
209
+ end
210
+
94
211
  # HTML metadata (T::Struct from types.rb)
95
212
  class HtmlMetadata attr_reader title: String?
96
213
  attr_reader description: String?
@@ -210,6 +327,162 @@ module Kreuzberg
210
327
  def serialize: () -> Hash[Symbol, untyped]
211
328
  end
212
329
 
330
+ # Code span location (tree-sitter process result)
331
+ class CodeSpan
332
+ attr_reader start_byte: Integer
333
+ attr_reader end_byte: Integer
334
+ attr_reader start_line: Integer
335
+ attr_reader start_column: Integer
336
+ attr_reader end_line: Integer
337
+ attr_reader end_column: Integer
338
+
339
+ def initialize: (start_byte: Integer, end_byte: Integer, start_line: Integer, start_column: Integer, end_line: Integer, end_column: Integer) -> void
340
+ def to_h: () -> Hash[Symbol, untyped]
341
+ end
342
+
343
+ # File-level code metrics (tree-sitter process result)
344
+ class CodeFileMetrics
345
+ attr_reader total_lines: Integer
346
+ attr_reader code_lines: Integer
347
+ attr_reader comment_lines: Integer
348
+ attr_reader blank_lines: Integer
349
+ attr_reader total_bytes: Integer
350
+ attr_reader node_count: Integer
351
+ attr_reader error_count: Integer
352
+ attr_reader max_depth: Integer
353
+
354
+ def initialize: (total_lines: Integer, code_lines: Integer, comment_lines: Integer, blank_lines: Integer, total_bytes: Integer, node_count: Integer, error_count: Integer, max_depth: Integer) -> void
355
+ def to_h: () -> Hash[Symbol, untyped]
356
+ end
357
+
358
+ # Code structure item (tree-sitter process result)
359
+ class CodeStructureItem
360
+ attr_reader kind: String
361
+ attr_reader name: String?
362
+ attr_reader visibility: String?
363
+ attr_reader span: CodeSpan
364
+ attr_reader children: Array[CodeStructureItem]
365
+ attr_reader decorators: Array[String]
366
+ attr_reader doc_comment: String?
367
+ attr_reader signature: String?
368
+ attr_reader body_span: CodeSpan?
369
+
370
+ def initialize: (kind: String, name: String?, visibility: String?, span: CodeSpan, children: Array[CodeStructureItem], decorators: Array[String], doc_comment: String?, signature: String?, body_span: CodeSpan?) -> void
371
+ def to_h: () -> Hash[Symbol, untyped]
372
+ end
373
+
374
+ # Import information (tree-sitter process result)
375
+ class CodeImportInfo
376
+ attr_reader source: String
377
+ attr_reader items: Array[String]
378
+ attr_reader alias: String?
379
+ attr_reader is_wildcard: bool
380
+ attr_reader span: CodeSpan
381
+
382
+ def initialize: (source: String, items: Array[String], alias: String?, is_wildcard: bool, span: CodeSpan) -> void
383
+ def to_h: () -> Hash[Symbol, untyped]
384
+ end
385
+
386
+ # Export information (tree-sitter process result)
387
+ class CodeExportInfo
388
+ attr_reader name: String
389
+ attr_reader kind: String
390
+ attr_reader span: CodeSpan
391
+
392
+ def initialize: (name: String, kind: String, span: CodeSpan) -> void
393
+ def to_h: () -> Hash[Symbol, untyped]
394
+ end
395
+
396
+ # Symbol information (tree-sitter process result)
397
+ class CodeSymbolInfo
398
+ attr_reader name: String
399
+ attr_reader kind: String
400
+ attr_reader type_annotation: String?
401
+ attr_reader span: CodeSpan
402
+
403
+ def initialize: (name: String, kind: String, type_annotation: String?, span: CodeSpan) -> void
404
+ def to_h: () -> Hash[Symbol, untyped]
405
+ end
406
+
407
+ # Comment information (tree-sitter process result)
408
+ class CodeCommentInfo
409
+ attr_reader text: String
410
+ attr_reader kind: String
411
+ attr_reader span: CodeSpan
412
+
413
+ def initialize: (text: String, kind: String, span: CodeSpan) -> void
414
+ def to_h: () -> Hash[Symbol, untyped]
415
+ end
416
+
417
+ # Documentation section (tree-sitter process result)
418
+ class CodeDocSection
419
+ attr_reader kind: String
420
+ attr_reader name: String?
421
+ attr_reader content: String
422
+
423
+ def initialize: (kind: String, name: String?, content: String) -> void
424
+ def to_h: () -> Hash[Symbol, untyped]
425
+ end
426
+
427
+ # Docstring information (tree-sitter process result)
428
+ class CodeDocstringInfo
429
+ attr_reader text: String
430
+ attr_reader format: String
431
+ attr_reader associated_item: String?
432
+ attr_reader span: CodeSpan
433
+ attr_reader sections: Array[CodeDocSection]
434
+
435
+ def initialize: (text: String, format: String, associated_item: String?, span: CodeSpan, sections: Array[CodeDocSection]) -> void
436
+ def to_h: () -> Hash[Symbol, untyped]
437
+ end
438
+
439
+ # Diagnostic from code analysis (tree-sitter process result)
440
+ class CodeDiagnostic
441
+ attr_reader message: String
442
+ attr_reader severity: String
443
+ attr_reader span: CodeSpan
444
+
445
+ def initialize: (message: String, severity: String, span: CodeSpan) -> void
446
+ def to_h: () -> Hash[Symbol, untyped]
447
+ end
448
+
449
+ # Chunk context (tree-sitter process result)
450
+ class CodeChunkContext
451
+ attr_reader parent_name: String?
452
+ attr_reader parent_kind: String?
453
+
454
+ def initialize: (parent_name: String?, parent_kind: String?) -> void
455
+ def to_h: () -> Hash[Symbol, untyped]
456
+ end
457
+
458
+ # Code chunk (tree-sitter process result)
459
+ class CodeChunk
460
+ attr_reader content: String
461
+ attr_reader language: String
462
+ attr_reader span: CodeSpan
463
+ attr_reader context: CodeChunkContext?
464
+
465
+ def initialize: (content: String, language: String, span: CodeSpan, context: CodeChunkContext?) -> void
466
+ def to_h: () -> Hash[Symbol, untyped]
467
+ end
468
+
469
+ # Full code processing result (tree-sitter process result)
470
+ class CodeProcessResult
471
+ attr_reader language: String
472
+ attr_reader metrics: CodeFileMetrics
473
+ attr_reader structure: Array[CodeStructureItem]
474
+ attr_reader imports: Array[CodeImportInfo]
475
+ attr_reader exports: Array[CodeExportInfo]
476
+ attr_reader comments: Array[CodeCommentInfo]
477
+ attr_reader docstrings: Array[CodeDocstringInfo]
478
+ attr_reader symbols: Array[CodeSymbolInfo]
479
+ attr_reader diagnostics: Array[CodeDiagnostic]
480
+ attr_reader chunks: Array[CodeChunk]
481
+
482
+ def initialize: (language: String, metrics: CodeFileMetrics, structure: Array[CodeStructureItem], imports: Array[CodeImportInfo], exports: Array[CodeExportInfo], comments: Array[CodeCommentInfo], docstrings: Array[CodeDocstringInfo], symbols: Array[CodeSymbolInfo], diagnostics: Array[CodeDiagnostic], chunks: Array[CodeChunk]) -> void
483
+ def to_h: () -> Hash[Symbol, untyped]
484
+ end
485
+
213
486
  # Config namespace (defined in lib/kreuzberg/config.rb)
214
487
  module Config
215
488
  class OCR
@@ -491,6 +764,32 @@ module Kreuzberg
491
764
  def to_h: () -> Hash[Symbol, untyped]
492
765
  end
493
766
 
767
+ class TreeSitterProcessConfig
768
+ attr_reader structure: bool
769
+ attr_reader imports: bool
770
+ attr_reader exports: bool
771
+ attr_reader comments: bool
772
+ attr_reader docstrings: bool
773
+ attr_reader symbols: bool
774
+ attr_reader diagnostics: bool
775
+ attr_reader chunk_max_size: Integer?
776
+ attr_reader content_mode: String?
777
+
778
+ def initialize: (?structure: bool, ?imports: bool, ?exports: bool, ?comments: bool, ?docstrings: bool, ?symbols: bool, ?diagnostics: bool, ?chunk_max_size: Integer?, ?content_mode: String?) -> void
779
+ def to_h: () -> Hash[Symbol, untyped]
780
+ end
781
+
782
+ class TreeSitterConfig
783
+ attr_reader enabled: bool?
784
+ attr_reader cache_dir: String?
785
+ attr_reader languages: Array[String]?
786
+ attr_reader groups: Array[String]?
787
+ attr_reader process: TreeSitterProcessConfig?
788
+
789
+ def initialize: (?enabled: bool?, ?cache_dir: String?, ?languages: Array[String]?, ?groups: Array[String]?, ?process: (TreeSitterProcessConfig | Hash[Symbol, untyped])?) -> void
790
+ def to_h: () -> Hash[Symbol, untyped]
791
+ end
792
+
494
793
  class Extraction
495
794
  attr_reader use_cache: bool
496
795
  attr_reader enable_quality_processing: bool
@@ -514,6 +813,7 @@ module Kreuzberg
514
813
  attr_reader concurrency: Concurrency?
515
814
  attr_reader acceleration: Acceleration?
516
815
  attr_reader email: Email?
816
+ attr_reader tree_sitter: TreeSitterConfig?
517
817
  attr_reader max_concurrent_extractions: Integer?
518
818
  attr_reader max_archive_depth: Integer
519
819
  attr_reader output_format: String?
@@ -544,6 +844,7 @@ module Kreuzberg
544
844
  ?concurrency: (Concurrency | Hash[Symbol, untyped])?,
545
845
  ?acceleration: (Acceleration | Hash[Symbol, untyped])?,
546
846
  ?email: (Email | Hash[Symbol, untyped])?,
847
+ ?tree_sitter: (TreeSitterConfig | Hash[Symbol, untyped])?,
547
848
  ?max_concurrent_extractions: Integer?,
548
849
  ?max_archive_depth: Integer,
549
850
  ?output_format: String?,
@@ -845,6 +1146,7 @@ module Kreuzberg
845
1146
  # Text chunk (Struct from result.rb)
846
1147
  class Chunk
847
1148
  attr_reader content: String
1149
+ attr_reader chunk_type: String
848
1150
  attr_reader byte_start: Integer
849
1151
  attr_reader byte_end: Integer
850
1152
  attr_reader token_count: Integer?
@@ -857,6 +1159,7 @@ module Kreuzberg
857
1159
 
858
1160
  def initialize: (
859
1161
  content: String,
1162
+ chunk_type: String,
860
1163
  byte_start: Integer,
861
1164
  byte_end: Integer,
862
1165
  token_count: Integer?,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kreuzberg
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.3
4
+ version: 4.7.2
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Na'aman Hirschfeld
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-03-27 00:00:00.000000000 Z
11
+ date: 2026-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -205,7 +205,6 @@ files:
205
205
  - spec/binding/cache_spec.rb
206
206
  - spec/binding/cli_proxy_spec.rb
207
207
  - spec/binding/cli_spec.rb
208
- - spec/binding/config_result_spec.rb
209
208
  - spec/binding/config_spec.rb
210
209
  - spec/binding/config_validation_spec.rb
211
210
  - spec/binding/embeddings_spec.rb
@@ -215,32 +214,13 @@ files:
215
214
  - spec/binding/font_config_spec.rb
216
215
  - spec/binding/images_spec.rb
217
216
  - spec/binding/keywords_extraction_spec.rb
218
- - spec/binding/metadata_types_spec.rb
219
217
  - spec/binding/pages_extraction_spec.rb
220
218
  - spec/binding/plugins/ocr_backend_spec.rb
221
219
  - spec/binding/plugins/postprocessor_spec.rb
222
220
  - spec/binding/plugins/validator_spec.rb
223
221
  - spec/binding/render_spec.rb
224
222
  - spec/binding/tables_spec.rb
225
- - spec/serialization_spec.rb
226
- - spec/smoke/package_spec.rb
227
223
  - spec/spec_helper.rb
228
- - spec/unit/config/chunking_config_spec.rb
229
- - spec/unit/config/embedding_config_spec.rb
230
- - spec/unit/config/extraction_config_spec.rb
231
- - spec/unit/config/font_config_spec.rb
232
- - spec/unit/config/hierarchy_config_spec.rb
233
- - spec/unit/config/image_extraction_config_spec.rb
234
- - spec/unit/config/image_preprocessing_config_spec.rb
235
- - spec/unit/config/keyword_config_spec.rb
236
- - spec/unit/config/language_detection_config_spec.rb
237
- - spec/unit/config/ocr_config_spec.rb
238
- - spec/unit/config/output_format_spec.rb
239
- - spec/unit/config/page_config_spec.rb
240
- - spec/unit/config/pdf_config_spec.rb
241
- - spec/unit/config/postprocessor_config_spec.rb
242
- - spec/unit/config/tesseract_config_spec.rb
243
- - spec/unit/config/token_reduction_config_spec.rb
244
224
  homepage: https://github.com/kreuzberg-dev/kreuzberg
245
225
  licenses:
246
226
  - MIT