@eigenpal/cli 0.10.26 → 0.10.28
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.
- package/dist/cli.js +1190 -55
- package/dist/skill/reference/step-types.md +28 -0
- package/package.json +1 -1
|
@@ -375,6 +375,8 @@ Extract text from documents (PDF, DOCX, images) using OCR or vision models
|
|
|
375
375
|
| `languages` | array<string> | no | | OCR language hints |
|
|
376
376
|
| `outputFormat` | `"plain"` \| `"markdown"` \| `"djot"` \| `"html"` | no | `"markdown"` | Format for extracted text. `markdown` (default) keeps structure and is best for LLM extraction; `plain` is unstyled text; `djot`/`html` preserve more layout. Only the native (Kreuzberg) parser respects this — OCR/VLM always emit markdown. |
|
|
377
377
|
| `nativeText` | boolean | no | `false` | Extract native/embedded text from PDFs without OCR/VLM. Faster and uses no credits. Falls back to OCR/VLM if the PDF has no embedded text. |
|
|
378
|
+
| `describeFigures` | boolean | no | | Opt-in (default off). After text extraction, detect which pages contain figures with an in-worker layout model, then caption those pages with a vision model and append `<figure>description</figure>` to their text — so image-only pages (property photos, signatures, charts) become findable by text-based steps like ai.split. Note: the layout scan runs over all pages, and the caption step and its vision calls are billed. Skipped for plaintext. |
|
|
379
|
+
| `figureInstructions` | string | no | | Custom instruction for the figure-description pass, e.g. "Describe each figure; label a handwritten signature as `<figure>signature</figure>` and a stamp as `<figure>stamp</figure>`; for property photos note the room or exterior shown." Applied only when describeFigures runs. |
|
|
378
380
|
|
|
379
381
|
**Output:** `object`
|
|
380
382
|
|
|
@@ -430,6 +432,7 @@ Split a parsed document into named sections using an LLM. Consumes ai.parse outp
|
|
|
430
432
|
| Field | Type | Required | Default | Description |
|
|
431
433
|
| --- | --- | --- | --- | --- |
|
|
432
434
|
| `splits` | array<object> | yes | | Sections found in the document, in page order. Absent sections are omitted. |
|
|
435
|
+
| `sections` | record<string, object> | yes | | The same sections keyed by config name, so a downstream step can reference one directly: `{{ steps.<split>.output.sections.<name>.page_range }}`. Prefer this over filtering `splits`. On a duplicate name the last wins. |
|
|
433
436
|
|
|
434
437
|
#### `ai.segment` — Separate Documents
|
|
435
438
|
|
|
@@ -479,6 +482,31 @@ Classify a document or text into one of a fixed label set using an LLM. Output e
|
|
|
479
482
|
| `confidence` | `"low"` \| `"medium"` \| `"high"` | yes | | LLM confidence in the classification. Coarse enum — numeric scores cluster meaninglessly at 0.85-0.95. |
|
|
480
483
|
| `reason` | string | yes | | Short justification for the chosen label — useful for debugging. |
|
|
481
484
|
|
|
485
|
+
#### `ai.vision` — Inspect Pages (Vision)
|
|
486
|
+
|
|
487
|
+
Inspect rendered page images with a vision model and return structured JSON matching a schema. The visual counterpart to Extract Data: use it for conclusions that live in the pixels rather than the text (is the document signed? are the photos usable?). Renders PDF, image, or Office/Word inputs; route to specific pages with an ai.split page range to keep it cheap.
|
|
488
|
+
|
|
489
|
+
**Durable retry:** Provider request retries are separate; the workflow engine does not durably retry this step.
|
|
490
|
+
|
|
491
|
+
**Config** (in `step.with`):
|
|
492
|
+
|
|
493
|
+
| Field | Type | Required | Default | Description |
|
|
494
|
+
| --- | --- | --- | --- | --- |
|
|
495
|
+
| `document` | string | yes | | Template expression resolving to the input file (PDF, image, or Office document). |
|
|
496
|
+
| `pageFrom` | integer \| string | no | | First page to inspect (0-based, inclusive). Optional. Accepts a template expression. When omitted, starts from the first page. |
|
|
497
|
+
| `pageTo` | integer \| string | no | | Last page to inspect (0-based, inclusive). Optional. Accepts a template expression. When omitted, runs to the last page. When BOTH pageFrom and pageTo are omitted, the whole document is inspected in chunks of maxPages (divide-and-conquer, results merged). |
|
|
498
|
+
| `schema` | object | yes | | JSON Schema defining the structure the vision model should return. |
|
|
499
|
+
| `prompt` | string | no | | Optional instruction refining the extraction. The schema drives it when omitted. |
|
|
500
|
+
| `provider` | string | no | | Provider ID (must support vision). |
|
|
501
|
+
| `model` | string | no | | Model override (must support vision). |
|
|
502
|
+
| `renderScale` | number | no | | PDF render scale (1.0 = 72 DPI). Raise for small text or weak VLM OCR. Capped at 6 to avoid oversized page rasters. |
|
|
503
|
+
| `imageQuality` | integer | no | | JPEG quality for rendered pages (default 85). |
|
|
504
|
+
| `maxPages` | integer | no | | Chunk size: the maximum pages sent to the vision model in a single call. When the inspected range (or the whole document) is larger, it is split into chunks of this size and the per-chunk results are merged by a reduce pass. The reduce follows each field's DESCRIPTION: a boolean described as "present on any page" is OR-ed, one described as "true for every page" is AND-ed, and list fields are concatenated. The merge is most reliable for boolean/scalar claims; for schemas that AGGREGATE long lists across chunks it can still drop or reorder items, so prefer a bounded page range for large list extraction. Default 20, capped at 100. |
|
|
505
|
+
|
|
506
|
+
**Output:** `record<string, unknown>`
|
|
507
|
+
|
|
508
|
+
> Structured data matching the provided schema. The output also carries a reserved `_vision` key recording the inspected source document ref and the page indices that were rendered, so the UI can re-rasterize exactly those pages client-side. `_vision` is excluded from user-schema validation.
|
|
509
|
+
|
|
482
510
|
### Transform steps — deterministic data transforms
|
|
483
511
|
|
|
484
512
|
#### `transform.set` — Set Value
|