@eigenpal/cli 0.17.5 → 0.19.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.
- package/dist/cli.js +201 -17
- package/dist/docs-bundle.json +26 -5
- package/dist/skill/reference/step-types.md +265 -0
- package/dist/skill/reference/workflow-yaml.md +1 -0
- package/package.json +1 -1
|
@@ -504,6 +504,7 @@ Extract text from documents (PDF, DOCX, images) using native extraction, OCR, or
|
|
|
504
504
|
| `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. |
|
|
505
505
|
| `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. |
|
|
506
506
|
| `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. |
|
|
507
|
+
| `cache` | boolean | no | `false` | When true, reuse a prior parse for identical file bytes and parse settings. Skips OCR/vision on cache hit. Stored in tenant blob storage with no automatic expiry (TTL/lifecycle is a follow-up). Default off. |
|
|
507
508
|
|
|
508
509
|
**Output:** `object`
|
|
509
510
|
|
|
@@ -643,6 +644,11 @@ Config schema:
|
|
|
643
644
|
"figureInstructions": {
|
|
644
645
|
"description": "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.",
|
|
645
646
|
"type": "string"
|
|
647
|
+
},
|
|
648
|
+
"cache": {
|
|
649
|
+
"description": "When true, reuse a prior parse for identical file bytes and parse settings. Skips OCR/vision on cache hit. Stored in tenant blob storage with no automatic expiry (TTL/lifecycle is a follow-up). Default off.",
|
|
650
|
+
"default": false,
|
|
651
|
+
"type": "boolean"
|
|
646
652
|
}
|
|
647
653
|
},
|
|
648
654
|
"required": [
|
|
@@ -698,6 +704,9 @@ Output schema:
|
|
|
698
704
|
"type": "integer",
|
|
699
705
|
"minimum": 0,
|
|
700
706
|
"maximum": 9007199254740991
|
|
707
|
+
},
|
|
708
|
+
"cached": {
|
|
709
|
+
"type": "boolean"
|
|
701
710
|
}
|
|
702
711
|
},
|
|
703
712
|
"required": [
|
|
@@ -3979,6 +3988,262 @@ Output schema:
|
|
|
3979
3988
|
```
|
|
3980
3989
|
|
|
3981
3990
|
|
|
3991
|
+
#### `transform.crop-regions` — Crop Regions
|
|
3992
|
+
|
|
3993
|
+
Render a PDF or image and crop normalized bounding boxes into JPEG run output artifacts. Pair with transform.script (bbox lists from ai.parse layout) and ai.extract or ai.vision for captions.
|
|
3994
|
+
|
|
3995
|
+
**Behavior and examples:** `eigenpal docs read steps/transform/crop-regions`
|
|
3996
|
+
|
|
3997
|
+
**Durable retry:** Transforms, including those that write files, are not durably retried.
|
|
3998
|
+
|
|
3999
|
+
**Config** (in `step.with`):
|
|
4000
|
+
|
|
4001
|
+
| Field | Type | Required | Default | Description |
|
|
4002
|
+
| --- | --- | --- | --- | --- |
|
|
4003
|
+
| `input` | string | yes | | File input — template expression e.g. {{ input.document }} resolving to a PDF or image |
|
|
4004
|
+
| `regions` | string \| array<object> | yes | | Regions to crop — pageIndex + normalized bbox per entry |
|
|
4005
|
+
| `renderScale` | number | no | `1` | Scale factor when rasterizing PDF pages before cropping |
|
|
4006
|
+
| `imageQuality` | integer | no | `85` | JPEG quality for cropped outputs |
|
|
4007
|
+
| `paddingFrac` | number | no | `0.02` | Padding around each bbox as a fraction of the shorter page edge |
|
|
4008
|
+
| `minCropPx` | integer | no | `8` | Minimum crop width/height in pixels; smaller crops fall back to the full page |
|
|
4009
|
+
| `maxRegions` | integer | no | `100` | Maximum regions processed per invocation |
|
|
4010
|
+
|
|
4011
|
+
**Output:** `object`
|
|
4012
|
+
|
|
4013
|
+
| Field | Type | Required | Default | Description |
|
|
4014
|
+
| --- | --- | --- | --- | --- |
|
|
4015
|
+
| `regions` | array<object> | yes | | Successfully cropped regions |
|
|
4016
|
+
| `skipped` | integer | no | | Regions skipped (invalid bbox or missing page) |
|
|
4017
|
+
|
|
4018
|
+
##### Complete machine-readable schemas
|
|
4019
|
+
|
|
4020
|
+
Config schema:
|
|
4021
|
+
|
|
4022
|
+
```json
|
|
4023
|
+
{
|
|
4024
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4025
|
+
"type": "object",
|
|
4026
|
+
"properties": {
|
|
4027
|
+
"input": {
|
|
4028
|
+
"type": "string",
|
|
4029
|
+
"description": "File input — template expression e.g. {{ input.document }} resolving to a PDF or image"
|
|
4030
|
+
},
|
|
4031
|
+
"regions": {
|
|
4032
|
+
"anyOf": [
|
|
4033
|
+
{
|
|
4034
|
+
"type": "string",
|
|
4035
|
+
"minLength": 1,
|
|
4036
|
+
"description": "Template expression resolving to a region array, e.g. {{ steps.list-figures.output.regions }}"
|
|
4037
|
+
},
|
|
4038
|
+
{
|
|
4039
|
+
"minItems": 1,
|
|
4040
|
+
"type": "array",
|
|
4041
|
+
"items": {
|
|
4042
|
+
"type": "object",
|
|
4043
|
+
"properties": {
|
|
4044
|
+
"id": {
|
|
4045
|
+
"description": "Stable region id used in output and crop filenames (defaults to region-N)",
|
|
4046
|
+
"type": "string"
|
|
4047
|
+
},
|
|
4048
|
+
"pageIndex": {
|
|
4049
|
+
"description": "0-based page index to crop from (images use page 0)",
|
|
4050
|
+
"default": 0,
|
|
4051
|
+
"type": "integer",
|
|
4052
|
+
"minimum": 0,
|
|
4053
|
+
"maximum": 9007199254740991
|
|
4054
|
+
},
|
|
4055
|
+
"bbox": {
|
|
4056
|
+
"type": "array",
|
|
4057
|
+
"items": [
|
|
4058
|
+
{
|
|
4059
|
+
"type": "number",
|
|
4060
|
+
"minimum": 0,
|
|
4061
|
+
"maximum": 1
|
|
4062
|
+
},
|
|
4063
|
+
{
|
|
4064
|
+
"type": "number",
|
|
4065
|
+
"minimum": 0,
|
|
4066
|
+
"maximum": 1
|
|
4067
|
+
},
|
|
4068
|
+
{
|
|
4069
|
+
"type": "number",
|
|
4070
|
+
"minimum": 0,
|
|
4071
|
+
"maximum": 1
|
|
4072
|
+
},
|
|
4073
|
+
{
|
|
4074
|
+
"type": "number",
|
|
4075
|
+
"minimum": 0,
|
|
4076
|
+
"maximum": 1
|
|
4077
|
+
}
|
|
4078
|
+
],
|
|
4079
|
+
"description": "Normalized axis-aligned bbox [x0, y0, x1, y1]"
|
|
4080
|
+
}
|
|
4081
|
+
},
|
|
4082
|
+
"required": [
|
|
4083
|
+
"bbox"
|
|
4084
|
+
],
|
|
4085
|
+
"additionalProperties": false
|
|
4086
|
+
},
|
|
4087
|
+
"description": "Regions to crop from the rendered document"
|
|
4088
|
+
}
|
|
4089
|
+
],
|
|
4090
|
+
"description": "Regions to crop — pageIndex + normalized bbox per entry"
|
|
4091
|
+
},
|
|
4092
|
+
"renderScale": {
|
|
4093
|
+
"description": "Scale factor when rasterizing PDF pages before cropping",
|
|
4094
|
+
"default": 1,
|
|
4095
|
+
"type": "number",
|
|
4096
|
+
"minimum": 0.5,
|
|
4097
|
+
"maximum": 4
|
|
4098
|
+
},
|
|
4099
|
+
"imageQuality": {
|
|
4100
|
+
"description": "JPEG quality for cropped outputs",
|
|
4101
|
+
"default": 85,
|
|
4102
|
+
"type": "integer",
|
|
4103
|
+
"minimum": 1,
|
|
4104
|
+
"maximum": 100
|
|
4105
|
+
},
|
|
4106
|
+
"paddingFrac": {
|
|
4107
|
+
"description": "Padding around each bbox as a fraction of the shorter page edge",
|
|
4108
|
+
"default": 0.02,
|
|
4109
|
+
"type": "number",
|
|
4110
|
+
"minimum": 0,
|
|
4111
|
+
"maximum": 0.2
|
|
4112
|
+
},
|
|
4113
|
+
"minCropPx": {
|
|
4114
|
+
"description": "Minimum crop width/height in pixels; smaller crops fall back to the full page",
|
|
4115
|
+
"default": 8,
|
|
4116
|
+
"type": "integer",
|
|
4117
|
+
"minimum": 1,
|
|
4118
|
+
"maximum": 9007199254740991
|
|
4119
|
+
},
|
|
4120
|
+
"maxRegions": {
|
|
4121
|
+
"description": "Maximum regions processed per invocation",
|
|
4122
|
+
"default": 100,
|
|
4123
|
+
"type": "integer",
|
|
4124
|
+
"minimum": 1,
|
|
4125
|
+
"maximum": 200
|
|
4126
|
+
}
|
|
4127
|
+
},
|
|
4128
|
+
"required": [
|
|
4129
|
+
"input",
|
|
4130
|
+
"regions"
|
|
4131
|
+
],
|
|
4132
|
+
"additionalProperties": false
|
|
4133
|
+
}
|
|
4134
|
+
```
|
|
4135
|
+
|
|
4136
|
+
|
|
4137
|
+
Output schema:
|
|
4138
|
+
|
|
4139
|
+
```json
|
|
4140
|
+
{
|
|
4141
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4142
|
+
"type": "object",
|
|
4143
|
+
"properties": {
|
|
4144
|
+
"regions": {
|
|
4145
|
+
"type": "array",
|
|
4146
|
+
"items": {
|
|
4147
|
+
"type": "object",
|
|
4148
|
+
"properties": {
|
|
4149
|
+
"id": {
|
|
4150
|
+
"type": "string",
|
|
4151
|
+
"description": "Region id (from input or auto-generated)"
|
|
4152
|
+
},
|
|
4153
|
+
"pageIndex": {
|
|
4154
|
+
"type": "integer",
|
|
4155
|
+
"minimum": 0,
|
|
4156
|
+
"maximum": 9007199254740991,
|
|
4157
|
+
"description": "0-based page index the crop was taken from"
|
|
4158
|
+
},
|
|
4159
|
+
"bbox": {
|
|
4160
|
+
"type": "array",
|
|
4161
|
+
"items": [
|
|
4162
|
+
{
|
|
4163
|
+
"type": "number",
|
|
4164
|
+
"minimum": 0,
|
|
4165
|
+
"maximum": 1
|
|
4166
|
+
},
|
|
4167
|
+
{
|
|
4168
|
+
"type": "number",
|
|
4169
|
+
"minimum": 0,
|
|
4170
|
+
"maximum": 1
|
|
4171
|
+
},
|
|
4172
|
+
{
|
|
4173
|
+
"type": "number",
|
|
4174
|
+
"minimum": 0,
|
|
4175
|
+
"maximum": 1
|
|
4176
|
+
},
|
|
4177
|
+
{
|
|
4178
|
+
"type": "number",
|
|
4179
|
+
"minimum": 0,
|
|
4180
|
+
"maximum": 1
|
|
4181
|
+
}
|
|
4182
|
+
],
|
|
4183
|
+
"description": "Normalized bbox that was cropped"
|
|
4184
|
+
},
|
|
4185
|
+
"width": {
|
|
4186
|
+
"type": "integer",
|
|
4187
|
+
"minimum": 1,
|
|
4188
|
+
"maximum": 9007199254740991,
|
|
4189
|
+
"description": "Crop width in pixels"
|
|
4190
|
+
},
|
|
4191
|
+
"height": {
|
|
4192
|
+
"type": "integer",
|
|
4193
|
+
"minimum": 1,
|
|
4194
|
+
"maximum": 9007199254740991,
|
|
4195
|
+
"description": "Crop height in pixels"
|
|
4196
|
+
},
|
|
4197
|
+
"fileId": {
|
|
4198
|
+
"type": "string",
|
|
4199
|
+
"description": "Run output file id for the JPEG crop"
|
|
4200
|
+
},
|
|
4201
|
+
"filename": {
|
|
4202
|
+
"type": "string",
|
|
4203
|
+
"description": "Stored crop filename"
|
|
4204
|
+
},
|
|
4205
|
+
"mimeType": {
|
|
4206
|
+
"type": "string",
|
|
4207
|
+
"const": "image/jpeg",
|
|
4208
|
+
"description": "Always image/jpeg"
|
|
4209
|
+
},
|
|
4210
|
+
"size": {
|
|
4211
|
+
"type": "integer",
|
|
4212
|
+
"minimum": 0,
|
|
4213
|
+
"maximum": 9007199254740991,
|
|
4214
|
+
"description": "JPEG size in bytes"
|
|
4215
|
+
}
|
|
4216
|
+
},
|
|
4217
|
+
"required": [
|
|
4218
|
+
"id",
|
|
4219
|
+
"pageIndex",
|
|
4220
|
+
"bbox",
|
|
4221
|
+
"width",
|
|
4222
|
+
"height",
|
|
4223
|
+
"fileId",
|
|
4224
|
+
"filename",
|
|
4225
|
+
"mimeType",
|
|
4226
|
+
"size"
|
|
4227
|
+
],
|
|
4228
|
+
"additionalProperties": false
|
|
4229
|
+
},
|
|
4230
|
+
"description": "Successfully cropped regions"
|
|
4231
|
+
},
|
|
4232
|
+
"skipped": {
|
|
4233
|
+
"description": "Regions skipped (invalid bbox or missing page)",
|
|
4234
|
+
"type": "integer",
|
|
4235
|
+
"minimum": 0,
|
|
4236
|
+
"maximum": 9007199254740991
|
|
4237
|
+
}
|
|
4238
|
+
},
|
|
4239
|
+
"required": [
|
|
4240
|
+
"regions"
|
|
4241
|
+
],
|
|
4242
|
+
"additionalProperties": false
|
|
4243
|
+
}
|
|
4244
|
+
```
|
|
4245
|
+
|
|
4246
|
+
|
|
3982
4247
|
#### `transform.xlsx-to-json` — Spreadsheet to JSON
|
|
3983
4248
|
|
|
3984
4249
|
Convert an XLS or XLSX spreadsheet to a JSON array of row objects. Supports headerless files, named or positional columns, displayed text, and a single rectangular range.
|
|
@@ -1114,6 +1114,7 @@ This JSON Schema is generated from the same Zod schema used to parse workflow YA
|
|
|
1114
1114
|
"transform.merge",
|
|
1115
1115
|
"transform.template",
|
|
1116
1116
|
"transform.pdf-embed",
|
|
1117
|
+
"transform.crop-regions",
|
|
1117
1118
|
"transform.xlsx-to-json",
|
|
1118
1119
|
"transform.json-to-xlsx",
|
|
1119
1120
|
"transform.script",
|