@xberg-io/opencode-xberg 1.3.8 → 1.3.11

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.
Files changed (150) hide show
  1. package/.opencode/ai-rulez-bundle.json +17 -16
  2. package/.opencode/ai-rulez-content.js +3 -3
  3. package/.opencode/commands/xberg-extract.md +3 -3
  4. package/.opencode/commands/xberg-ocr.md +3 -3
  5. package/.opencode/plugins/xberg.js +1 -1
  6. package/.opencode/skills/xberg/SKILL.md +16 -21
  7. package/.opencode/skills/xberg/index.md +10 -0
  8. package/.opencode/skills/xberg/references/advanced-features.md +1 -1
  9. package/.opencode/skills/xberg/references/cli-reference.md +3 -3
  10. package/.opencode/skills/xberg/references/configuration.md +4 -4
  11. package/.opencode/skills/xberg/references/nodejs-api.md +1 -1
  12. package/.opencode/skills/xberg/references/other-bindings.md +1 -1
  13. package/.opencode/skills/xberg/references/python-api.md +3 -3
  14. package/.opencode/skills/xberg/references/rust-api.md +5 -5
  15. package/.opencode/skills/xberg/references/supported-formats.md +1 -1
  16. package/.opencode/skills/{batch-extraction → xberg-batch-extraction}/SKILL.md +11 -9
  17. package/.opencode/skills/xberg-batch-extraction/index.md +10 -0
  18. package/.opencode/skills/xberg-batch-extraction/references/advanced-features.md +628 -0
  19. package/.opencode/skills/xberg-batch-extraction/references/cli-reference.md +462 -0
  20. package/.opencode/skills/xberg-batch-extraction/references/configuration.md +587 -0
  21. package/.opencode/skills/xberg-batch-extraction/references/nodejs-api.md +485 -0
  22. package/.opencode/skills/xberg-batch-extraction/references/other-bindings.md +345 -0
  23. package/.opencode/skills/xberg-batch-extraction/references/python-api.md +657 -0
  24. package/.opencode/skills/xberg-batch-extraction/references/rust-api.md +412 -0
  25. package/.opencode/skills/xberg-batch-extraction/references/supported-formats.md +252 -0
  26. package/{.pi/skills/chunking → .opencode/skills/xberg-chunking}/SKILL.md +5 -5
  27. package/.opencode/skills/xberg-chunking/index.md +10 -0
  28. package/.opencode/skills/xberg-chunking/references/advanced-features.md +628 -0
  29. package/.opencode/skills/xberg-chunking/references/cli-reference.md +462 -0
  30. package/.opencode/skills/xberg-chunking/references/configuration.md +587 -0
  31. package/.opencode/skills/xberg-chunking/references/nodejs-api.md +485 -0
  32. package/.opencode/skills/xberg-chunking/references/other-bindings.md +345 -0
  33. package/.opencode/skills/xberg-chunking/references/python-api.md +657 -0
  34. package/.opencode/skills/xberg-chunking/references/rust-api.md +412 -0
  35. package/.opencode/skills/xberg-chunking/references/supported-formats.md +252 -0
  36. package/.opencode/skills/{extracting-keywords → xberg-extracting-keywords}/SKILL.md +7 -8
  37. package/.opencode/skills/xberg-extracting-keywords/index.md +10 -0
  38. package/.opencode/skills/xberg-extracting-keywords/references/advanced-features.md +628 -0
  39. package/.opencode/skills/xberg-extracting-keywords/references/cli-reference.md +462 -0
  40. package/.opencode/skills/xberg-extracting-keywords/references/configuration.md +587 -0
  41. package/.opencode/skills/xberg-extracting-keywords/references/nodejs-api.md +485 -0
  42. package/.opencode/skills/xberg-extracting-keywords/references/other-bindings.md +345 -0
  43. package/.opencode/skills/xberg-extracting-keywords/references/python-api.md +657 -0
  44. package/.opencode/skills/xberg-extracting-keywords/references/rust-api.md +412 -0
  45. package/.opencode/skills/xberg-extracting-keywords/references/supported-formats.md +252 -0
  46. package/{.pi/skills/extracting-tables → .opencode/skills/xberg-extracting-tables}/SKILL.md +4 -5
  47. package/.opencode/skills/xberg-extracting-tables/index.md +10 -0
  48. package/.opencode/skills/xberg-extracting-tables/references/advanced-features.md +628 -0
  49. package/.opencode/skills/xberg-extracting-tables/references/cli-reference.md +462 -0
  50. package/.opencode/skills/xberg-extracting-tables/references/configuration.md +587 -0
  51. package/.opencode/skills/xberg-extracting-tables/references/nodejs-api.md +485 -0
  52. package/.opencode/skills/xberg-extracting-tables/references/other-bindings.md +345 -0
  53. package/.opencode/skills/xberg-extracting-tables/references/python-api.md +657 -0
  54. package/.opencode/skills/xberg-extracting-tables/references/rust-api.md +412 -0
  55. package/.opencode/skills/xberg-extracting-tables/references/supported-formats.md +252 -0
  56. package/{.pi/skills/extracting-with-ocr → .opencode/skills/xberg-extracting-with-ocr}/SKILL.md +5 -6
  57. package/.opencode/skills/xberg-extracting-with-ocr/index.md +10 -0
  58. package/.opencode/skills/xberg-extracting-with-ocr/references/advanced-features.md +628 -0
  59. package/.opencode/skills/xberg-extracting-with-ocr/references/cli-reference.md +462 -0
  60. package/.opencode/skills/xberg-extracting-with-ocr/references/configuration.md +587 -0
  61. package/.opencode/skills/xberg-extracting-with-ocr/references/nodejs-api.md +485 -0
  62. package/.opencode/skills/xberg-extracting-with-ocr/references/other-bindings.md +345 -0
  63. package/.opencode/skills/xberg-extracting-with-ocr/references/python-api.md +657 -0
  64. package/.opencode/skills/xberg-extracting-with-ocr/references/rust-api.md +412 -0
  65. package/.opencode/skills/xberg-extracting-with-ocr/references/supported-formats.md +252 -0
  66. package/.opencode/skills/{picking-a-format → xberg-picking-a-format}/SKILL.md +4 -4
  67. package/.opencode/skills/xberg-picking-a-format/index.md +10 -0
  68. package/.opencode/skills/xberg-picking-a-format/references/advanced-features.md +628 -0
  69. package/.opencode/skills/xberg-picking-a-format/references/cli-reference.md +462 -0
  70. package/.opencode/skills/xberg-picking-a-format/references/configuration.md +587 -0
  71. package/.opencode/skills/xberg-picking-a-format/references/nodejs-api.md +485 -0
  72. package/.opencode/skills/xberg-picking-a-format/references/other-bindings.md +345 -0
  73. package/.opencode/skills/xberg-picking-a-format/references/python-api.md +657 -0
  74. package/.opencode/skills/xberg-picking-a-format/references/rust-api.md +412 -0
  75. package/.opencode/skills/xberg-picking-a-format/references/supported-formats.md +252 -0
  76. package/.pi/prompts/xberg-extract.md +1 -1
  77. package/.pi/prompts/xberg-ocr.md +1 -1
  78. package/.pi/skills/xberg/SKILL.md +16 -21
  79. package/.pi/skills/xberg/index.md +10 -0
  80. package/.pi/skills/xberg/references/advanced-features.md +1 -1
  81. package/.pi/skills/xberg/references/cli-reference.md +3 -3
  82. package/.pi/skills/xberg/references/configuration.md +4 -4
  83. package/.pi/skills/xberg/references/nodejs-api.md +1 -1
  84. package/.pi/skills/xberg/references/other-bindings.md +1 -1
  85. package/.pi/skills/xberg/references/python-api.md +3 -3
  86. package/.pi/skills/xberg/references/rust-api.md +5 -5
  87. package/.pi/skills/xberg/references/supported-formats.md +1 -1
  88. package/.pi/skills/{batch-extraction → xberg-batch-extraction}/SKILL.md +11 -9
  89. package/.pi/skills/xberg-batch-extraction/index.md +10 -0
  90. package/.pi/skills/xberg-batch-extraction/references/advanced-features.md +628 -0
  91. package/.pi/skills/xberg-batch-extraction/references/cli-reference.md +462 -0
  92. package/.pi/skills/xberg-batch-extraction/references/configuration.md +587 -0
  93. package/.pi/skills/xberg-batch-extraction/references/nodejs-api.md +485 -0
  94. package/.pi/skills/xberg-batch-extraction/references/other-bindings.md +345 -0
  95. package/.pi/skills/xberg-batch-extraction/references/python-api.md +657 -0
  96. package/.pi/skills/xberg-batch-extraction/references/rust-api.md +412 -0
  97. package/.pi/skills/xberg-batch-extraction/references/supported-formats.md +252 -0
  98. package/{.opencode/skills/chunking → .pi/skills/xberg-chunking}/SKILL.md +5 -5
  99. package/.pi/skills/xberg-chunking/index.md +10 -0
  100. package/.pi/skills/xberg-chunking/references/advanced-features.md +628 -0
  101. package/.pi/skills/xberg-chunking/references/cli-reference.md +462 -0
  102. package/.pi/skills/xberg-chunking/references/configuration.md +587 -0
  103. package/.pi/skills/xberg-chunking/references/nodejs-api.md +485 -0
  104. package/.pi/skills/xberg-chunking/references/other-bindings.md +345 -0
  105. package/.pi/skills/xberg-chunking/references/python-api.md +657 -0
  106. package/.pi/skills/xberg-chunking/references/rust-api.md +412 -0
  107. package/.pi/skills/xberg-chunking/references/supported-formats.md +252 -0
  108. package/.pi/skills/{extracting-keywords → xberg-extracting-keywords}/SKILL.md +7 -8
  109. package/.pi/skills/xberg-extracting-keywords/index.md +10 -0
  110. package/.pi/skills/xberg-extracting-keywords/references/advanced-features.md +628 -0
  111. package/.pi/skills/xberg-extracting-keywords/references/cli-reference.md +462 -0
  112. package/.pi/skills/xberg-extracting-keywords/references/configuration.md +587 -0
  113. package/.pi/skills/xberg-extracting-keywords/references/nodejs-api.md +485 -0
  114. package/.pi/skills/xberg-extracting-keywords/references/other-bindings.md +345 -0
  115. package/.pi/skills/xberg-extracting-keywords/references/python-api.md +657 -0
  116. package/.pi/skills/xberg-extracting-keywords/references/rust-api.md +412 -0
  117. package/.pi/skills/xberg-extracting-keywords/references/supported-formats.md +252 -0
  118. package/{.opencode/skills/extracting-tables → .pi/skills/xberg-extracting-tables}/SKILL.md +4 -5
  119. package/.pi/skills/xberg-extracting-tables/index.md +10 -0
  120. package/.pi/skills/xberg-extracting-tables/references/advanced-features.md +628 -0
  121. package/.pi/skills/xberg-extracting-tables/references/cli-reference.md +462 -0
  122. package/.pi/skills/xberg-extracting-tables/references/configuration.md +587 -0
  123. package/.pi/skills/xberg-extracting-tables/references/nodejs-api.md +485 -0
  124. package/.pi/skills/xberg-extracting-tables/references/other-bindings.md +345 -0
  125. package/.pi/skills/xberg-extracting-tables/references/python-api.md +657 -0
  126. package/.pi/skills/xberg-extracting-tables/references/rust-api.md +412 -0
  127. package/.pi/skills/xberg-extracting-tables/references/supported-formats.md +252 -0
  128. package/{.opencode/skills/extracting-with-ocr → .pi/skills/xberg-extracting-with-ocr}/SKILL.md +5 -6
  129. package/.pi/skills/xberg-extracting-with-ocr/index.md +10 -0
  130. package/.pi/skills/xberg-extracting-with-ocr/references/advanced-features.md +628 -0
  131. package/.pi/skills/xberg-extracting-with-ocr/references/cli-reference.md +462 -0
  132. package/.pi/skills/xberg-extracting-with-ocr/references/configuration.md +587 -0
  133. package/.pi/skills/xberg-extracting-with-ocr/references/nodejs-api.md +485 -0
  134. package/.pi/skills/xberg-extracting-with-ocr/references/other-bindings.md +345 -0
  135. package/.pi/skills/xberg-extracting-with-ocr/references/python-api.md +657 -0
  136. package/.pi/skills/xberg-extracting-with-ocr/references/rust-api.md +412 -0
  137. package/.pi/skills/xberg-extracting-with-ocr/references/supported-formats.md +252 -0
  138. package/.pi/skills/{picking-a-format → xberg-picking-a-format}/SKILL.md +4 -4
  139. package/.pi/skills/xberg-picking-a-format/index.md +10 -0
  140. package/.pi/skills/xberg-picking-a-format/references/advanced-features.md +628 -0
  141. package/.pi/skills/xberg-picking-a-format/references/cli-reference.md +462 -0
  142. package/.pi/skills/xberg-picking-a-format/references/configuration.md +587 -0
  143. package/.pi/skills/xberg-picking-a-format/references/nodejs-api.md +485 -0
  144. package/.pi/skills/xberg-picking-a-format/references/other-bindings.md +345 -0
  145. package/.pi/skills/xberg-picking-a-format/references/python-api.md +657 -0
  146. package/.pi/skills/xberg-picking-a-format/references/rust-api.md +412 -0
  147. package/.pi/skills/xberg-picking-a-format/references/supported-formats.md +252 -0
  148. package/README.md +72 -6
  149. package/package.json +135 -20
  150. package/scripts/mcp-launch.sh +6 -5
@@ -5,7 +5,7 @@ description: Extract scanned documents with OCR
5
5
  <!--
6
6
  AI-RULEZ :: GENERATED FILE — DO NOT EDIT
7
7
  Content-Hash: blake3:1715ebd3d000212eb2e4dbfa814d6d5990bcc0c636bae67734a503f2c3ae8be4
8
- Source-Hash: blake3:3fca38eb564d0ed9c9194d070fd8dec96de727edc92e82954cb4b9af52cddbaf
8
+ Source-Hash: blake3:662aa704cf97ad20f02258c9dcd1c73822213a426e27ec7ebc292d3f599fb7c2
9
9
  Schema-Version: v1
10
10
  -->
11
11
 
@@ -1,22 +1,17 @@
1
1
  ---
2
- name: xberg
3
- description: >-
4
- Extract text, tables, metadata, and images from 107 document formats
5
- (PDF, Office, images, HTML, email, archives, academic) using Xberg.
6
- Use when writing code that calls Xberg APIs in Python, Node.js/TypeScript,
7
- Rust, or CLI. Covers installation, extraction (sync/async), configuration
8
- (OCR, chunking, output format), batch processing, error handling, and plugins.
2
+ description: Extract text, tables, metadata, and images from 107 document formats (PDF, Office, images, HTML, email, archives, academic) using Xberg. Use when writing code that calls Xberg APIs in Python, Node.js/TypeScript, Rust, or CLI. Covers installation, extraction (sync/async), configuration (OCR, chunking, output format), batch processing, error handling, and plugins.
9
3
  license: Elastic-2.0
10
4
  metadata:
11
- author: xberg-io
12
- version: "0.1.0"
13
- repository: https://github.com/xberg-io/xberg
5
+ author: xberg-io
6
+ version: "0.1.0"
7
+ repository: https://github.com/xberg-io/xberg
8
+ name: xberg
14
9
  ---
15
10
 
16
11
  <!--
17
12
  AI-RULEZ :: GENERATED FILE — DO NOT EDIT
18
- Content-Hash: blake3:8d1ddd2c0fd7b6e9473737826178427138c3fac45cedd5b6c3d0b8a243739deb
19
- Source-Hash: blake3:3fca38eb564d0ed9c9194d070fd8dec96de727edc92e82954cb4b9af52cddbaf
13
+ Content-Hash: blake3:5c39696cf46f9dabada4de547cf7b610394f57c4002ed5d2055fc83521fa3141
14
+ Source-Hash: blake3:662aa704cf97ad20f02258c9dcd1c73822213a426e27ec7ebc292d3f599fb7c2
20
15
  Schema-Version: v1
21
16
  -->
22
17
 
@@ -68,8 +63,8 @@ tokio = { version = "1", features = ["full"] }
68
63
  ```bash
69
64
  brew install xberg-io/tap/xberg
70
65
  # or run without a persistent install (the CLI proxy package self-installs the binary):
71
- npx @xberg-io/xberg-cli --help
72
- uvx --from xberg-cli xberg --help
66
+ npx @xberg-io/xberg-cli@1.3.10 --help
67
+ uvx --from xberg-cli==1.3.8 xberg --help
73
68
  # or download a prebuilt binary from the latest GitHub release:
74
69
  # https://github.com/xberg-io/xberg/releases/latest
75
70
  # or build from source:
@@ -220,7 +215,7 @@ xberg extract doc.pdf --config-json '{"ocr":{"backend":"tesseract","language":"d
220
215
 
221
216
  ## Batch Processing
222
217
 
223
- `extract_batch` takes a list of `ExtractInput`s and returns one envelope whose `results` array holds a document per input (in input order); per-input failures are reported in `result.errors`.
218
+ `extract_batch` takes a list of `ExtractInput`s and returns one envelope whose `results` array holds documents in discovery order; one input may yield multiple documents. Per-input failures are reported in `result.errors` with an input index.
224
219
 
225
220
  ### Python
226
221
 
@@ -416,12 +411,12 @@ Detailed reference files for specific topics:
416
411
 
417
412
  Task-focused sibling skills go deeper than this overview:
418
413
 
419
- - **extracting-with-ocr** — OCR backends, language packs, force-OCR, tuning.
420
- - **extracting-tables** — layout-aware table detection and table models.
421
- - **chunking** — chunk size/overlap, markdown/yaml/semantic chunkers, the `chunk` command.
422
- - **extracting-keywords** — YAKE/RAKE keywords, language detection, the `embed` command.
423
- - **batch-extraction** — the `batch` command, `--file-configs`, parallelism, error recovery.
424
- - **picking-a-format** — choosing `--format` / `--content-format` per consumer.
414
+ - **xberg-extracting-with-ocr** — OCR backends, language packs, force-OCR, tuning.
415
+ - **xberg-extracting-tables** — layout-aware table detection and table models.
416
+ - **xberg-chunking** — chunk size/overlap, markdown/yaml/semantic chunkers, the `chunk` command.
417
+ - **xberg-extracting-keywords** — YAKE/RAKE keywords, language detection, the `embed` command.
418
+ - **xberg-batch-extraction** — the `batch` command, `--file-configs`, parallelism, error recovery.
419
+ - **xberg-picking-a-format** — choosing `--format` / `--content-format` per consumer.
425
420
 
426
421
  Full documentation: <https://docs.xberg.io>
427
422
  GitHub: <https://github.com/xberg-io/xberg>
@@ -0,0 +1,10 @@
1
+ <!--
2
+ AI-RULEZ :: GENERATED FILE — DO NOT EDIT
3
+ Content-Hash: blake3:995528a20ef3610c2da46cc63052bc232907509eca3477ba3e2decb42fba0146
4
+ Source-Hash: blake3:662aa704cf97ad20f02258c9dcd1c73822213a426e27ec7ebc292d3f599fb7c2
5
+ Schema-Version: v1
6
+ -->
7
+
8
+ # Concepts
9
+
10
+ * [Xberg](SKILL.md) - Extract text, tables, metadata, and images from 107 document formats (PDF, Office, images, HTML, email, archives, academic) using Xberg. Use when writing code that calls Xberg APIs in Python, Node.js/TypeScript, Rust, or CLI. Covers installation, extraction (sync/async), configuration (OCR, chunking, output format), batch processing, error handling, and plugins.
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  AI-RULEZ :: GENERATED FILE — DO NOT EDIT
3
3
  Content-Hash: blake3:353a7a05cbe84a2af1d053c8173d2154f418972a2bbfc2846dbb2c17a8a46197
4
- Source-Hash: blake3:3fca38eb564d0ed9c9194d070fd8dec96de727edc92e82954cb4b9af52cddbaf
4
+ Source-Hash: blake3:662aa704cf97ad20f02258c9dcd1c73822213a426e27ec7ebc292d3f599fb7c2
5
5
  Schema-Version: v1
6
6
  -->
7
7
 
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  AI-RULEZ :: GENERATED FILE — DO NOT EDIT
3
- Content-Hash: blake3:cd55a9d089a4fe188a64803a05bf46b418949673c0b952c381eefdd2416457f5
4
- Source-Hash: blake3:3fca38eb564d0ed9c9194d070fd8dec96de727edc92e82954cb4b9af52cddbaf
3
+ Content-Hash: blake3:b9281b07af57a10b362019da24d8545036e83015038e2f5902bfe167f165ecec
4
+ Source-Hash: blake3:662aa704cf97ad20f02258c9dcd1c73822213a426e27ec7ebc292d3f599fb7c2
5
5
  Schema-Version: v1
6
6
  -->
7
7
 
@@ -422,7 +422,7 @@ xberg batch *.pdf --config extraction-config.toml
422
422
 
423
423
  ```bash
424
424
  # Extract to JSON for downstream processing
425
- xberg extract file.pdf --format json | jq '.content'
425
+ xberg extract file.pdf --format json | jq '.result.content'
426
426
 
427
427
  # Batch process with error handling
428
428
  xberg batch docs/*.pdf --format json || exit 1
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  AI-RULEZ :: GENERATED FILE — DO NOT EDIT
3
- Content-Hash: blake3:a8f2b7b96ef3d33120ab21586c9f7db80c4d17eba727757ff0e94cee6e7d28c0
4
- Source-Hash: blake3:3fca38eb564d0ed9c9194d070fd8dec96de727edc92e82954cb4b9af52cddbaf
3
+ Content-Hash: blake3:025df7e4b6c9e1dd2a98b81236a46d427816da719521512e3b03bc2ae15ae065
4
+ Source-Hash: blake3:662aa704cf97ad20f02258c9dcd1c73822213a426e27ec7ebc292d3f599fb7c2
5
5
  Schema-Version: v1
6
6
  -->
7
7
 
@@ -106,7 +106,7 @@ max_archive_depth = 3
106
106
  | `cache_ttl_secs` | int \| null | `null` | Per-request cache TTL in seconds. `0` skips the cache entirely |
107
107
  | `qr_codes` | boolean \| null | `null` | Enable QR-code detection in extracted images |
108
108
 
109
- Nested sections (each `None`/unset by default unless noted): `ocr`, `chunking`, `content_filter`, `images`, `pdf_options`, `token_reduction`, `language_detection`, `pages`, `keywords`, `postprocessor`, `html_output`, `security_limits`, `layout`, `transcription`, `acceleration`, `email`, `tree_sitter`, `structured_extraction`, `ner`, `redaction`, `summarization`, `translation`, `page_classification`, `captioning`, and `url`. The `url` section always has a default (it is not optional). The sections documented below are the ones most commonly set in config files.
109
+ Nested sections (each `None`/unset by default unless noted): `ocr`, `xberg-chunking`, `content_filter`, `images`, `pdf_options`, `token_reduction`, `language_detection`, `pages`, `keywords`, `postprocessor`, `html_output`, `security_limits`, `layout`, `transcription`, `acceleration`, `email`, `tree_sitter`, `structured_extraction`, `ner`, `redaction`, `summarization`, `translation`, `page_classification`, `captioning`, and `url`. The `url` section always has a default (it is not optional). The sections documented below are the ones most commonly set in config files.
110
110
 
111
111
  ### OCR Configuration
112
112
 
@@ -449,7 +449,7 @@ result = await extract_batch(
449
449
  )
450
450
  ```
451
451
 
452
- **Overridable fields:** `enable_quality_processing`, `ocr`, `force_ocr`, `force_ocr_pages`, `disable_ocr`, `chunking`, `content_filter`, `images`, `pdf_options`, `token_reduction`, `language_detection`, `pages`, `keywords`, `postprocessor`, `html_output` (and `html_options`), `result_format`, `output_format`, `include_document_structure`, `layout`, `transcription`, `timeout_secs`, `tree_sitter`, `structured_extraction`, `url`, `ner`, `redaction`, `summarization`, `translation`, `page_classification`, `captioning`, `qr_codes`.
452
+ **Overridable fields:** `enable_quality_processing`, `ocr`, `force_ocr`, `force_ocr_pages`, `disable_ocr`, `xberg-chunking`, `content_filter`, `images`, `pdf_options`, `token_reduction`, `language_detection`, `pages`, `keywords`, `postprocessor`, `html_output` (and `html_options`), `result_format`, `output_format`, `include_document_structure`, `layout`, `transcription`, `timeout_secs`, `tree_sitter`, `structured_extraction`, `url`, `ner`, `redaction`, `summarization`, `translation`, `page_classification`, `captioning`, `qr_codes`.
453
453
 
454
454
  **Batch-level only (not overridable per input):** `max_concurrent_extractions`, `use_cache`, `acceleration`, `security_limits`.
455
455
 
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  AI-RULEZ :: GENERATED FILE — DO NOT EDIT
3
3
  Content-Hash: blake3:5dd1dce4a7814ed37c2ea273dda3dd60d7caa18b08b0aff933ce3a8f7717d1a6
4
- Source-Hash: blake3:3fca38eb564d0ed9c9194d070fd8dec96de727edc92e82954cb4b9af52cddbaf
4
+ Source-Hash: blake3:662aa704cf97ad20f02258c9dcd1c73822213a426e27ec7ebc292d3f599fb7c2
5
5
  Schema-Version: v1
6
6
  -->
7
7
 
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  AI-RULEZ :: GENERATED FILE — DO NOT EDIT
3
3
  Content-Hash: blake3:dacb4d7def21681b8b237603d2c7b89beaf18b8ee4110175b6ea5593022f3229
4
- Source-Hash: blake3:3fca38eb564d0ed9c9194d070fd8dec96de727edc92e82954cb4b9af52cddbaf
4
+ Source-Hash: blake3:662aa704cf97ad20f02258c9dcd1c73822213a426e27ec7ebc292d3f599fb7c2
5
5
  Schema-Version: v1
6
6
  -->
7
7
 
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  AI-RULEZ :: GENERATED FILE — DO NOT EDIT
3
- Content-Hash: blake3:c551708aa62f1b25b1cea8041e8aab5b3101a1622317b7239d3de04d8a375754
4
- Source-Hash: blake3:3fca38eb564d0ed9c9194d070fd8dec96de727edc92e82954cb4b9af52cddbaf
3
+ Content-Hash: blake3:723cd2abd915f92766e2dec9c90922b94ef60ad5ce81c606bd680b055e5c4717
4
+ Source-Hash: blake3:662aa704cf97ad20f02258c9dcd1c73822213a426e27ec7ebc292d3f599fb7c2
5
5
  Schema-Version: v1
6
6
  -->
7
7
 
@@ -128,7 +128,7 @@ Main extraction configuration. All fields are optional and use sensible defaults
128
128
  | `enable_quality_processing` | bool | True | Quality post-processing to clean and normalize extracted text. |
129
129
  | `ocr` | OcrConfig \| None | None | OCR configuration. None = OCR disabled. |
130
130
  | `force_ocr` | bool | False | Force OCR even for searchable PDFs that contain extractable text. |
131
- | `chunking` | ChunkingConfig \| None | None | Text chunking configuration. None = disabled. |
131
+ | `xberg-chunking` | ChunkingConfig \| None | None | Text chunking configuration. None = disabled. |
132
132
  | `images` | ImageExtractionConfig \| None | None | Extract images FROM documents. None = no image extraction. |
133
133
  | `pdf_options` | PdfConfig \| None | None | PDF-specific options. |
134
134
  | `token_reduction` | TokenReductionOptions \| None | None | Reduce token count in extracted content. None = no reduction. |
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  AI-RULEZ :: GENERATED FILE — DO NOT EDIT
3
- Content-Hash: blake3:a6ececeeda3031d9d84eb780fcb5ecb41b3f4297fa1e6b86f492e0d755b084a9
4
- Source-Hash: blake3:3fca38eb564d0ed9c9194d070fd8dec96de727edc92e82954cb4b9af52cddbaf
3
+ Content-Hash: blake3:a257c85add0ba02dd9ab63eecac13348152038919a09ba99964261256acf4ee4
4
+ Source-Hash: blake3:662aa704cf97ad20f02258c9dcd1c73822213a426e27ec7ebc292d3f599fb7c2
5
5
  Schema-Version: v1
6
6
  -->
7
7
 
@@ -36,7 +36,7 @@ The `tokio-runtime` feature is on by default. Capabilities are gated behind feat
36
36
  | `full` | `formats` + ocr + layout + embeddings + tree-sitter + LLM. |
37
37
  | `pdf` | PDF extraction. |
38
38
  | `ocr` | Tesseract-based OCR. |
39
- | `chunking` | Text chunking for RAG pipelines. |
39
+ | `xberg-chunking` | Text chunking for RAG pipelines. |
40
40
  | `embeddings` | ONNX embedding generation. |
41
41
  | `language-detection` | Detect document language(s). |
42
42
  | `keywords` | YAKE + RAKE keyword extraction. |
@@ -79,7 +79,7 @@ async fn main() -> xberg::Result<()> {
79
79
  pub async fn extract_batch(inputs: Vec<ExtractInput>, config: &ExtractionConfig) -> Result<ExtractionResult>
80
80
  ```
81
81
 
82
- Extract multiple inputs in parallel. The returned envelope's `results` holds one `ExtractedDocument` per input (in input order), with non-fatal failures in `errors`.
82
+ Extract multiple inputs in parallel. The returned envelope's `results` holds `ExtractedDocument` values in discovery order; one input may yield multiple documents. Non-fatal failures in `errors` carry the original input index.
83
83
 
84
84
  ```rust
85
85
  use xberg::{extract_batch, ExtractInput, ExtractionConfig};
@@ -261,7 +261,7 @@ let config = ExtractionConfig {
261
261
 
262
262
  ```rust
263
263
  pub struct ExtractionResult {
264
- pub results: Vec<ExtractedDocument>, // one per input, in order
264
+ pub results: Vec<ExtractedDocument>, // documents in discovery order; multiple per input are possible
265
265
  pub errors: Vec<ExtractionErrorItem>, // non-fatal per-input errors
266
266
  pub summary: ExtractionSummary, // aggregate counts
267
267
  pub crawl_final_urls: Vec<String>,
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  AI-RULEZ :: GENERATED FILE — DO NOT EDIT
3
3
  Content-Hash: blake3:e3c1dcb34a4784efc4f7fd868468061c3bd49d41e7e39792086633dcfe029d63
4
- Source-Hash: blake3:3fca38eb564d0ed9c9194d070fd8dec96de727edc92e82954cb4b9af52cddbaf
4
+ Source-Hash: blake3:662aa704cf97ad20f02258c9dcd1c73822213a426e27ec7ebc292d3f599fb7c2
5
5
  Schema-Version: v1
6
6
  -->
7
7
 
@@ -1,12 +1,12 @@
1
1
  ---
2
- name: batch-extraction
3
2
  description: Use when extracting from many files at once with shared config, bounded parallelism, per-file overrides, and error recovery. Covers the `batch` command, `--file-configs`, `--max-concurrent`, and output layout.
3
+ name: xberg-batch-extraction
4
4
  ---
5
5
 
6
6
  <!--
7
7
  AI-RULEZ :: GENERATED FILE — DO NOT EDIT
8
- Content-Hash: blake3:3a70b47dd77fcd3f37e83bed3d32b1ad1ea9d6c1642ae8e0ff7b09b55939858a
9
- Source-Hash: blake3:3fca38eb564d0ed9c9194d070fd8dec96de727edc92e82954cb4b9af52cddbaf
8
+ Content-Hash: blake3:324433f2b10c7c9cdc1c06b98c1e427c8cb0ca9ccf034d336e28d49706add520
9
+ Source-Hash: blake3:662aa704cf97ad20f02258c9dcd1c73822213a426e27ec7ebc292d3f599fb7c2
10
10
  Schema-Version: v1
11
11
  -->
12
12
 
@@ -14,13 +14,13 @@ Schema-Version: v1
14
14
 
15
15
  Use this when processing a directory or glob of documents in one pass.
16
16
  `xberg batch` shares one extraction config across every file, runs
17
- extractions concurrently, and returns one structured array — failures on
17
+ extractions concurrently, and returns a JSON envelope — failures on
18
18
  individual files do not abort the run.
19
19
 
20
20
  ## Basic usage
21
21
 
22
22
  ```bash
23
- # Glob expands to many paths; results come back as a JSON array (default)
23
+ # Glob expands to many paths; results come back in a JSON envelope (default)
24
24
  xberg batch *.pdf
25
25
 
26
26
  # Mixed formats, markdown content for LLM ingestion
@@ -31,12 +31,14 @@ xberg batch $(find ./corpus -name '*.pdf')
31
31
  ```
32
32
 
33
33
  `batch` defaults to `--format json` (vs `--format text` for single
34
- `extract`). Each array entry is a full extraction result, so downstream
35
- code can index by position into the input path list.
34
+ `extract`). The envelope contains `results`, `total_ms`, `per_file_ms` and, when failures
35
+ occur, `errors`. Each `results` entry is a full extracted document. One input may produce
36
+ multiple documents, so do not pair results with inputs by position. `per_file_ms` is
37
+ aligned with inputs; inspect `errors` for per-input failures.
36
38
 
37
39
  ```bash
38
40
  xberg batch reports/*.pdf \
39
- | jq '.[] | {chars: (.content | length), mime: .mime_type}'
41
+ | jq '.results[] | {chars: (.content | length), mime: .mime_type}'
40
42
  ```
41
43
 
42
44
  ## Parallelism
@@ -146,7 +148,7 @@ for doc in output.results:
146
148
  Per-input overrides go on `ExtractInput.config` (a `FileExtractionConfig`).
147
149
  Node.js mirrors this with `extractBatch`; Rust uses `extract_batch(inputs, &config)`.
148
150
  See `references/python-api.md`, `references/nodejs-api.md`, and
149
- `references/rust-api.md` in the sibling `xberg` skill.
151
+ `references/rust-api.md`.
150
152
 
151
153
  ## MCP
152
154
 
@@ -0,0 +1,10 @@
1
+ <!--
2
+ AI-RULEZ :: GENERATED FILE — DO NOT EDIT
3
+ Content-Hash: blake3:16520a5ae77366107136a609dfa4d2479fdc16bc276035e0fef00ae71cfc13ca
4
+ Source-Hash: blake3:662aa704cf97ad20f02258c9dcd1c73822213a426e27ec7ebc292d3f599fb7c2
5
+ Schema-Version: v1
6
+ -->
7
+
8
+ # Concepts
9
+
10
+ * [Batch Extraction](SKILL.md) - Use when extracting from many files at once with shared config, bounded parallelism, per-file overrides, and error recovery. Covers the `batch` command, `--file-configs`, `--max-concurrent`, and output layout.