@eigenpal/cli 0.17.3 → 0.17.5
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/CHANGELOG.md +6 -0
- package/dist/cli.js +42 -3
- package/dist/docs-bundle.json +25 -4
- package/dist/skill/reference/step-types.md +211 -0
- package/dist/skill/reference/workflow-yaml.md +2 -1
- package/package.json +1 -1
|
@@ -3152,6 +3152,217 @@ Output schema:
|
|
|
3152
3152
|
```
|
|
3153
3153
|
|
|
3154
3154
|
|
|
3155
|
+
#### `ai.figure-crops` — Figure Crops
|
|
3156
|
+
|
|
3157
|
+
Crop and caption figure elements from a parsed PDF. Renders the source document, crops each kind=figure bbox from ai.parse output, and describes the crop with a vision model. Output is captions plus normalized bboxes for evidence viewers.
|
|
3158
|
+
|
|
3159
|
+
**Behavior and examples:** `eigenpal docs read steps/ai/figure-crops`
|
|
3160
|
+
|
|
3161
|
+
**Durable retry:** Provider request retries are separate; the workflow engine does not durably retry this step.
|
|
3162
|
+
|
|
3163
|
+
**Config** (in `step.with`):
|
|
3164
|
+
|
|
3165
|
+
| Field | Type | Required | Default | Description |
|
|
3166
|
+
| --- | --- | --- | --- | --- |
|
|
3167
|
+
| `input` | string | yes | | Storage reference or template expression for the source PDF |
|
|
3168
|
+
| `parseOutput` | unknown | yes | | ai.parse output object (template {{steps.<parse>.output}}); figure elements are read from its `elements` array |
|
|
3169
|
+
| `model` | string | no | | Vision model for captions (defaults to workspace model) |
|
|
3170
|
+
| `figureInstructions` | string | no | | Custom caption instruction; applied per figure crop |
|
|
3171
|
+
| `maxFigures` | integer | no | `40` | Cap on figures processed per document |
|
|
3172
|
+
| `minAreaFrac` | number | no | `0` | Skip figures below this page-area fraction (logos/decorations) |
|
|
3173
|
+
| `includeCrops` | boolean | no | `false` | Include base64 JPEG crops in output (heavy; default off — captions + bboxes only) |
|
|
3174
|
+
| `renderScale` | number | no | `1` | Scale factor for rendering PDF pages before cropping |
|
|
3175
|
+
| `imageQuality` | integer | no | `85` | JPEG quality for crops |
|
|
3176
|
+
| `llmReasoningEffort` | `"none"` \| `"minimal"` \| `"low"` \| `"medium"` \| `"high"` \| `"xhigh"` \| `"max"` | no | | Reasoning effort for models that support it. Omit to use the selected model's default. |
|
|
3177
|
+
|
|
3178
|
+
**Output:** `object`
|
|
3179
|
+
|
|
3180
|
+
| Field | Type | Required | Default | Description |
|
|
3181
|
+
| --- | --- | --- | --- | --- |
|
|
3182
|
+
| `figures` | array<object> | yes | | |
|
|
3183
|
+
| `_figureCrops` | object | yes | | |
|
|
3184
|
+
|
|
3185
|
+
##### Complete machine-readable schemas
|
|
3186
|
+
|
|
3187
|
+
Config schema:
|
|
3188
|
+
|
|
3189
|
+
```json
|
|
3190
|
+
{
|
|
3191
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3192
|
+
"type": "object",
|
|
3193
|
+
"properties": {
|
|
3194
|
+
"input": {
|
|
3195
|
+
"type": "string",
|
|
3196
|
+
"description": "Storage reference or template expression for the source PDF"
|
|
3197
|
+
},
|
|
3198
|
+
"parseOutput": {
|
|
3199
|
+
"description": "ai.parse output object (template {{steps.<parse>.output}}); figure elements are read from its `elements` array"
|
|
3200
|
+
},
|
|
3201
|
+
"model": {
|
|
3202
|
+
"description": "Vision model for captions (defaults to workspace model)",
|
|
3203
|
+
"type": "string"
|
|
3204
|
+
},
|
|
3205
|
+
"figureInstructions": {
|
|
3206
|
+
"description": "Custom caption instruction; applied per figure crop",
|
|
3207
|
+
"type": "string"
|
|
3208
|
+
},
|
|
3209
|
+
"maxFigures": {
|
|
3210
|
+
"description": "Cap on figures processed per document",
|
|
3211
|
+
"default": 40,
|
|
3212
|
+
"type": "integer",
|
|
3213
|
+
"minimum": 1,
|
|
3214
|
+
"maximum": 100
|
|
3215
|
+
},
|
|
3216
|
+
"minAreaFrac": {
|
|
3217
|
+
"description": "Skip figures below this page-area fraction (logos/decorations)",
|
|
3218
|
+
"default": 0,
|
|
3219
|
+
"type": "number",
|
|
3220
|
+
"minimum": 0,
|
|
3221
|
+
"maximum": 1
|
|
3222
|
+
},
|
|
3223
|
+
"includeCrops": {
|
|
3224
|
+
"description": "Include base64 JPEG crops in output (heavy; default off — captions + bboxes only)",
|
|
3225
|
+
"default": false,
|
|
3226
|
+
"type": "boolean"
|
|
3227
|
+
},
|
|
3228
|
+
"renderScale": {
|
|
3229
|
+
"description": "Scale factor for rendering PDF pages before cropping",
|
|
3230
|
+
"default": 1,
|
|
3231
|
+
"type": "number",
|
|
3232
|
+
"minimum": 1,
|
|
3233
|
+
"maximum": 4
|
|
3234
|
+
},
|
|
3235
|
+
"imageQuality": {
|
|
3236
|
+
"description": "JPEG quality for crops",
|
|
3237
|
+
"default": 85,
|
|
3238
|
+
"type": "integer",
|
|
3239
|
+
"minimum": 1,
|
|
3240
|
+
"maximum": 100
|
|
3241
|
+
},
|
|
3242
|
+
"llmReasoningEffort": {
|
|
3243
|
+
"description": "Reasoning effort for models that support it. Omit to use the selected model's default.",
|
|
3244
|
+
"type": "string",
|
|
3245
|
+
"enum": [
|
|
3246
|
+
"none",
|
|
3247
|
+
"minimal",
|
|
3248
|
+
"low",
|
|
3249
|
+
"medium",
|
|
3250
|
+
"high",
|
|
3251
|
+
"xhigh",
|
|
3252
|
+
"max"
|
|
3253
|
+
]
|
|
3254
|
+
}
|
|
3255
|
+
},
|
|
3256
|
+
"required": [
|
|
3257
|
+
"input",
|
|
3258
|
+
"parseOutput"
|
|
3259
|
+
],
|
|
3260
|
+
"additionalProperties": false
|
|
3261
|
+
}
|
|
3262
|
+
```
|
|
3263
|
+
|
|
3264
|
+
|
|
3265
|
+
Output schema:
|
|
3266
|
+
|
|
3267
|
+
```json
|
|
3268
|
+
{
|
|
3269
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3270
|
+
"type": "object",
|
|
3271
|
+
"properties": {
|
|
3272
|
+
"figures": {
|
|
3273
|
+
"type": "array",
|
|
3274
|
+
"items": {
|
|
3275
|
+
"type": "object",
|
|
3276
|
+
"properties": {
|
|
3277
|
+
"id": {
|
|
3278
|
+
"type": "string"
|
|
3279
|
+
},
|
|
3280
|
+
"page": {
|
|
3281
|
+
"type": "number"
|
|
3282
|
+
},
|
|
3283
|
+
"bboxNorm": {
|
|
3284
|
+
"anyOf": [
|
|
3285
|
+
{
|
|
3286
|
+
"type": "array",
|
|
3287
|
+
"items": [
|
|
3288
|
+
{
|
|
3289
|
+
"type": "number"
|
|
3290
|
+
},
|
|
3291
|
+
{
|
|
3292
|
+
"type": "number"
|
|
3293
|
+
},
|
|
3294
|
+
{
|
|
3295
|
+
"type": "number"
|
|
3296
|
+
},
|
|
3297
|
+
{
|
|
3298
|
+
"type": "number"
|
|
3299
|
+
}
|
|
3300
|
+
]
|
|
3301
|
+
},
|
|
3302
|
+
{
|
|
3303
|
+
"type": "null"
|
|
3304
|
+
}
|
|
3305
|
+
]
|
|
3306
|
+
},
|
|
3307
|
+
"areaFrac": {
|
|
3308
|
+
"type": "number"
|
|
3309
|
+
},
|
|
3310
|
+
"caption": {
|
|
3311
|
+
"anyOf": [
|
|
3312
|
+
{
|
|
3313
|
+
"type": "string"
|
|
3314
|
+
},
|
|
3315
|
+
{
|
|
3316
|
+
"type": "null"
|
|
3317
|
+
}
|
|
3318
|
+
]
|
|
3319
|
+
},
|
|
3320
|
+
"cropJpegBase64": {
|
|
3321
|
+
"type": "string"
|
|
3322
|
+
}
|
|
3323
|
+
},
|
|
3324
|
+
"required": [
|
|
3325
|
+
"id",
|
|
3326
|
+
"page",
|
|
3327
|
+
"bboxNorm",
|
|
3328
|
+
"areaFrac",
|
|
3329
|
+
"caption"
|
|
3330
|
+
],
|
|
3331
|
+
"additionalProperties": false
|
|
3332
|
+
}
|
|
3333
|
+
},
|
|
3334
|
+
"_figureCrops": {
|
|
3335
|
+
"type": "object",
|
|
3336
|
+
"properties": {
|
|
3337
|
+
"pages": {
|
|
3338
|
+
"type": "array",
|
|
3339
|
+
"items": {
|
|
3340
|
+
"type": "number"
|
|
3341
|
+
}
|
|
3342
|
+
},
|
|
3343
|
+
"model": {
|
|
3344
|
+
"type": "string"
|
|
3345
|
+
},
|
|
3346
|
+
"skippedSmall": {
|
|
3347
|
+
"type": "number"
|
|
3348
|
+
}
|
|
3349
|
+
},
|
|
3350
|
+
"required": [
|
|
3351
|
+
"pages",
|
|
3352
|
+
"skippedSmall"
|
|
3353
|
+
],
|
|
3354
|
+
"additionalProperties": false
|
|
3355
|
+
}
|
|
3356
|
+
},
|
|
3357
|
+
"required": [
|
|
3358
|
+
"figures",
|
|
3359
|
+
"_figureCrops"
|
|
3360
|
+
],
|
|
3361
|
+
"additionalProperties": false
|
|
3362
|
+
}
|
|
3363
|
+
```
|
|
3364
|
+
|
|
3365
|
+
|
|
3155
3366
|
### Transform steps — deterministic data transforms
|
|
3156
3367
|
|
|
3157
3368
|
#### `transform.set` — Set Value
|
|
@@ -1009,7 +1009,8 @@ This JSON Schema is generated from the same Zod schema used to parse workflow YA
|
|
|
1009
1009
|
"ai.classify",
|
|
1010
1010
|
"ai.classify-pages",
|
|
1011
1011
|
"ai.vision",
|
|
1012
|
-
"ai.search-files"
|
|
1012
|
+
"ai.search-files",
|
|
1013
|
+
"ai.figure-crops"
|
|
1013
1014
|
]
|
|
1014
1015
|
},
|
|
1015
1016
|
"name": {
|