@eigenpal/cli 0.17.5 → 0.18.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
CHANGED
|
@@ -7803,6 +7803,7 @@ var init_ids = __esm(() => {
|
|
|
7803
7803
|
FIGURE_CROPS: "builtin/figure-crops",
|
|
7804
7804
|
TEMPLATE: "builtin/template",
|
|
7805
7805
|
PDF_EMBEDDER: "builtin/pdf-embedder",
|
|
7806
|
+
CROP_REGIONS: "builtin/crop-regions",
|
|
7806
7807
|
XLSX_TO_JSON: "builtin/xlsx-to-json",
|
|
7807
7808
|
JSON_TO_XLSX: "builtin/json-to-xlsx",
|
|
7808
7809
|
ARCHIVE_LIST: "builtin/archive-list",
|
|
@@ -8164,7 +8165,8 @@ var init_parser = __esm(() => {
|
|
|
8164
8165
|
ParseUsageSchema = object({
|
|
8165
8166
|
pageCount: number2(),
|
|
8166
8167
|
processingTimeMs: number2().optional(),
|
|
8167
|
-
ocrPagesProcessed: number2().int().nonnegative().optional()
|
|
8168
|
+
ocrPagesProcessed: number2().int().nonnegative().optional(),
|
|
8169
|
+
cached: boolean2().optional()
|
|
8168
8170
|
});
|
|
8169
8171
|
StructuredDocumentSchema = record(string2(), unknown());
|
|
8170
8172
|
CoordinateUnitSchema = _enum(["pixel", "inch", "point", "normalized"]);
|
|
@@ -8350,7 +8352,8 @@ var init_document_parser = __esm(() => {
|
|
|
8350
8352
|
describeFigures: boolean2().optional().describe("Opt-in (default off). After text extraction, detect figure pages with a layout model and caption them with a vision model, appending `<figure>description</figure>` to their text. Skipped for plaintext. The caption vision calls are billed."),
|
|
8351
8353
|
figureInstructions: string2().optional().describe("Custom instruction for the figure-description pass."),
|
|
8352
8354
|
languages: array(string2()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
|
|
8353
|
-
outputFormat: ParseOutputFormatSchema.default("markdown").optional().describe(PARSE_OUTPUT_FORMAT_DESCRIPTION)
|
|
8355
|
+
outputFormat: ParseOutputFormatSchema.default("markdown").optional().describe(PARSE_OUTPUT_FORMAT_DESCRIPTION),
|
|
8356
|
+
cache: boolean2().default(false).optional().describe("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.")
|
|
8354
8357
|
}).superRefine(refineNativeParseModeConflicts).superRefine(refineLayoutOutputFormat).prefault({});
|
|
8355
8358
|
});
|
|
8356
8359
|
|
|
@@ -53691,6 +53694,7 @@ var init_steps = __esm(() => {
|
|
|
53691
53694
|
"transform.merge",
|
|
53692
53695
|
"transform.template",
|
|
53693
53696
|
"transform.pdf-embed",
|
|
53697
|
+
"transform.crop-regions",
|
|
53694
53698
|
"transform.xlsx-to-json",
|
|
53695
53699
|
"transform.json-to-xlsx",
|
|
53696
53700
|
"transform.script",
|
|
@@ -53839,7 +53843,7 @@ function getStepSchema(stepType) {
|
|
|
53839
53843
|
function listStepTypes() {
|
|
53840
53844
|
return [...STEP_TYPES];
|
|
53841
53845
|
}
|
|
53842
|
-
var OptionalReasoningEffortSchema, AiParseConfigSchema, AiParseOutputSchema, AiFigureCropsConfigSchema, AiFigureCropsFigureSchema, AiFigureCropsOutputSchema, AiExtractConfigSchema, AiExtractOutputSchema, VisionPageRangeSchema, AiVisionConfigSchema, AiVisionOutputSchema, AI_SEARCH_FILES_DEFAULT_MAX_ITERATIONS = 12, AI_SEARCH_FILES_MAX_ITERATIONS = 50, AI_SEARCH_FILES_DEFAULT_MAX_FILES = 50, AI_SEARCH_FILES_MAX_FILES = 200, AI_SEARCH_FILES_MAX_CITATION_EXCERPT_CHARS = 2000, AiSearchFilesConfigSchema, AiSearchFilesCitationSchema, AiSearchFilesOutputSchema, AiSplitConfigSchema, AiSplitSectionSchema, AiSplitOutputSchema, AiSegmentConfigSchema, AiSegmentOutputSchema, AiClassifyConfigSchema, AiClassifyOutputSchema, ClassifyPagesLabelSchema2, AiClassifyPagesConfigSchema, AiClassifyPagesOutputSchema, TransformSetConfigSchema, TransformSetOutputSchema, TransformRemoveConfigSchema, TransformRemoveOutputSchema, TransformCombineConfigSchema, TransformCombineOutputSchema, TransformSplitConfigSchema, TransformSplitOutputSchema, TransformMergeConfigSchema, TransformMergeOutputSchema, TransformTemplateConfigSchema, TransformTemplateOutputSchema, TransformPdfEmbedConfigSchema, TransformPdfEmbedOutputSchema, TransformXlsxToJsonConfigSchema, TransformXlsxToJsonOutputSchema, JsonToXlsxAuthoringRowsSchema, JsonToXlsxSheetConfigSchema, TransformJsonToXlsxConfigSchema, TransformJsonToXlsxOutputSchema, ARCHIVE_LIST_MAX_ENTRIES = 1e4, TransformArchiveListConfigSchema, TransformArchiveListEntrySchema, TransformArchiveListOutputSchema, TransformArchiveExtractConfigSchema, TransformArchiveExtractOutputSchema, TransformScriptConfigSchema, TransformScriptOutputSchema, ParsedDocPageSchema, TransformTextChunkerConfigSchema, TransformTextChunkerOutputSchema, RegexNormalizerSchema, RegexFormatSchema, REGEX_FLAGS, RegexFieldSchema, TransformRegexExtractConfigSchema, TransformRegexExtractOutputSchema, ActionHttpConfigSchema, ActionHttpOutputSchema, ActionInvokeWorkflowConfigSchema, ActionInvokeWorkflowOutputSchema, ActionWebsiteReaderConfigSchema, ActionWebsiteReaderOutputSchema, ACTION_EMAIL_MAX_ATTACHMENTS = 10, ACTION_EMAIL_MAX_ATTACHMENT_BYTES, ACTION_EMAIL_BODY_MAX_BYTES, emailBodyMaxBytes = (value) => new TextEncoder().encode(value).byteLength <= ACTION_EMAIL_BODY_MAX_BYTES, ActionEmailRecipientListSchema, ActionEmailToSchema, ActionEmailOptionalRecipientsSchema, ActionEmailAttachmentSchema, ActionEmailConfigSchema, ActionEmailOutputSchema, ControlIfConfigSchema, ControlIfOutputSchema, ControlSwitchConfigSchema, ControlSwitchOutputSchema, ControlForeachConfigSchema, ControlForeachOutputSchema, ControlParallelMapConfigSchema, ControlParallelMapOutputSchema, ControlParallelConfigSchema, ControlParallelOutputSchema, ControlWaitConfigSchema, ControlWaitOutputSchema, ControlHumanReviewConfigSchema, ControlHumanReviewOutputSchema, ControlFailConfigSchema, ControlFailOutputSchema, STEP_SCHEMAS;
|
|
53846
|
+
var OptionalReasoningEffortSchema, AiParseConfigSchema, AiParseOutputSchema, AiFigureCropsConfigSchema, AiFigureCropsFigureSchema, AiFigureCropsOutputSchema, AiExtractConfigSchema, AiExtractOutputSchema, VisionPageRangeSchema, AiVisionConfigSchema, AiVisionOutputSchema, AI_SEARCH_FILES_DEFAULT_MAX_ITERATIONS = 12, AI_SEARCH_FILES_MAX_ITERATIONS = 50, AI_SEARCH_FILES_DEFAULT_MAX_FILES = 50, AI_SEARCH_FILES_MAX_FILES = 200, AI_SEARCH_FILES_MAX_CITATION_EXCERPT_CHARS = 2000, AiSearchFilesConfigSchema, AiSearchFilesCitationSchema, AiSearchFilesOutputSchema, AiSplitConfigSchema, AiSplitSectionSchema, AiSplitOutputSchema, AiSegmentConfigSchema, AiSegmentOutputSchema, AiClassifyConfigSchema, AiClassifyOutputSchema, ClassifyPagesLabelSchema2, AiClassifyPagesConfigSchema, AiClassifyPagesOutputSchema, TransformSetConfigSchema, TransformSetOutputSchema, TransformRemoveConfigSchema, TransformRemoveOutputSchema, TransformCombineConfigSchema, TransformCombineOutputSchema, TransformSplitConfigSchema, TransformSplitOutputSchema, TransformMergeConfigSchema, TransformMergeOutputSchema, TransformTemplateConfigSchema, TransformTemplateOutputSchema, TransformPdfEmbedConfigSchema, TransformPdfEmbedOutputSchema, CropRegionBboxSchema, CropRegionSpecSchema, CropRegionSpecListSchema, CropRegionSpecListResolvedSchema, TransformCropRegionsConfigSchema, TransformCropRegionsCropSchema, TransformCropRegionsOutputSchema, CropRegionsProcessorConfigSchema, TransformXlsxToJsonConfigSchema, TransformXlsxToJsonOutputSchema, JsonToXlsxAuthoringRowsSchema, JsonToXlsxSheetConfigSchema, TransformJsonToXlsxConfigSchema, TransformJsonToXlsxOutputSchema, ARCHIVE_LIST_MAX_ENTRIES = 1e4, TransformArchiveListConfigSchema, TransformArchiveListEntrySchema, TransformArchiveListOutputSchema, TransformArchiveExtractConfigSchema, TransformArchiveExtractOutputSchema, TransformScriptConfigSchema, TransformScriptOutputSchema, ParsedDocPageSchema, TransformTextChunkerConfigSchema, TransformTextChunkerOutputSchema, RegexNormalizerSchema, RegexFormatSchema, REGEX_FLAGS, RegexFieldSchema, TransformRegexExtractConfigSchema, TransformRegexExtractOutputSchema, ActionHttpConfigSchema, ActionHttpOutputSchema, ActionInvokeWorkflowConfigSchema, ActionInvokeWorkflowOutputSchema, ActionWebsiteReaderConfigSchema, ActionWebsiteReaderOutputSchema, ACTION_EMAIL_MAX_ATTACHMENTS = 10, ACTION_EMAIL_MAX_ATTACHMENT_BYTES, ACTION_EMAIL_BODY_MAX_BYTES, emailBodyMaxBytes = (value) => new TextEncoder().encode(value).byteLength <= ACTION_EMAIL_BODY_MAX_BYTES, ActionEmailRecipientListSchema, ActionEmailToSchema, ActionEmailOptionalRecipientsSchema, ActionEmailAttachmentSchema, ActionEmailConfigSchema, ActionEmailOutputSchema, ControlIfConfigSchema, ControlIfOutputSchema, ControlSwitchConfigSchema, ControlSwitchOutputSchema, ControlForeachConfigSchema, ControlForeachOutputSchema, ControlParallelMapConfigSchema, ControlParallelMapOutputSchema, ControlParallelConfigSchema, ControlParallelOutputSchema, ControlWaitConfigSchema, ControlWaitOutputSchema, ControlHumanReviewConfigSchema, ControlHumanReviewOutputSchema, ControlFailConfigSchema, ControlFailOutputSchema, STEP_SCHEMAS;
|
|
53843
53847
|
var init_step_configs = __esm(() => {
|
|
53844
53848
|
init_zod();
|
|
53845
53849
|
init_ai_client();
|
|
@@ -53870,7 +53874,8 @@ var init_step_configs = __esm(() => {
|
|
|
53870
53874
|
outputFormat: ParseOutputFormatSchema.default("markdown").optional().describe(PARSE_OUTPUT_FORMAT_DESCRIPTION),
|
|
53871
53875
|
nativeText: boolean2().default(false).optional().describe("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."),
|
|
53872
53876
|
describeFigures: boolean2().optional().describe("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."),
|
|
53873
|
-
figureInstructions: string2().optional().describe('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.')
|
|
53877
|
+
figureInstructions: string2().optional().describe('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.'),
|
|
53878
|
+
cache: boolean2().default(false).optional().describe("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.")
|
|
53874
53879
|
}).superRefine(refineNativeParseModeConflicts).superRefine(refineLayoutOutputFormat);
|
|
53875
53880
|
AiParseOutputSchema = ParseResultSchema.omit({ rawResponse: true });
|
|
53876
53881
|
AiFigureCropsConfigSchema = object({
|
|
@@ -54220,6 +54225,55 @@ var init_step_configs = __esm(() => {
|
|
|
54220
54225
|
wordCount: number2().describe("Number of words embedded"),
|
|
54221
54226
|
text: string2().describe("Extracted text from the document")
|
|
54222
54227
|
});
|
|
54228
|
+
CropRegionBboxSchema = tuple([
|
|
54229
|
+
number2().min(0).max(1),
|
|
54230
|
+
number2().min(0).max(1),
|
|
54231
|
+
number2().min(0).max(1),
|
|
54232
|
+
number2().min(0).max(1)
|
|
54233
|
+
]);
|
|
54234
|
+
CropRegionSpecSchema = object({
|
|
54235
|
+
id: string2().optional().describe("Stable region id used in output and crop filenames (defaults to region-N)"),
|
|
54236
|
+
pageIndex: number2().int().min(0).default(0).optional().describe("0-based page index to crop from (images use page 0)"),
|
|
54237
|
+
bbox: CropRegionBboxSchema.describe("Normalized axis-aligned bbox [x0, y0, x1, y1]")
|
|
54238
|
+
});
|
|
54239
|
+
CropRegionSpecListSchema = array(CropRegionSpecSchema).min(1).describe("Regions to crop from the rendered document");
|
|
54240
|
+
CropRegionSpecListResolvedSchema = array(CropRegionSpecSchema).describe("Regions to crop from the rendered document (may be empty)");
|
|
54241
|
+
TransformCropRegionsConfigSchema = object({
|
|
54242
|
+
input: string2().describe("File input — template expression e.g. {{ input.document }} resolving to a PDF or image"),
|
|
54243
|
+
regions: union([
|
|
54244
|
+
string2().min(1).describe("Template expression resolving to a region array, e.g. {{ steps.list-figures.output.regions }}"),
|
|
54245
|
+
CropRegionSpecListSchema
|
|
54246
|
+
]).describe("Regions to crop — pageIndex + normalized bbox per entry"),
|
|
54247
|
+
renderScale: number2().min(0.5).max(4).default(1).optional().describe("Scale factor when rasterizing PDF pages before cropping"),
|
|
54248
|
+
imageQuality: number2().int().min(1).max(100).default(85).optional().describe("JPEG quality for cropped outputs"),
|
|
54249
|
+
paddingFrac: number2().min(0).max(0.2).default(0.02).optional().describe("Padding around each bbox as a fraction of the shorter page edge"),
|
|
54250
|
+
minCropPx: number2().int().min(1).default(8).optional().describe("Minimum crop width/height in pixels; smaller crops fall back to the full page"),
|
|
54251
|
+
maxRegions: number2().int().min(1).max(200).default(100).optional().describe("Maximum regions processed per invocation")
|
|
54252
|
+
});
|
|
54253
|
+
TransformCropRegionsCropSchema = object({
|
|
54254
|
+
id: string2().describe("Region id (from input or auto-generated)"),
|
|
54255
|
+
pageIndex: number2().int().min(0).describe("0-based page index the crop was taken from"),
|
|
54256
|
+
bbox: CropRegionBboxSchema.describe("Normalized bbox that was cropped"),
|
|
54257
|
+
width: number2().int().min(1).describe("Crop width in pixels"),
|
|
54258
|
+
height: number2().int().min(1).describe("Crop height in pixels"),
|
|
54259
|
+
fileId: string2().describe("Run output file id for the JPEG crop"),
|
|
54260
|
+
filename: string2().describe("Stored crop filename"),
|
|
54261
|
+
mimeType: literal("image/jpeg").describe("Always image/jpeg"),
|
|
54262
|
+
size: number2().int().min(0).describe("JPEG size in bytes")
|
|
54263
|
+
});
|
|
54264
|
+
TransformCropRegionsOutputSchema = object({
|
|
54265
|
+
regions: array(TransformCropRegionsCropSchema).describe("Successfully cropped regions"),
|
|
54266
|
+
skipped: number2().int().min(0).optional().describe("Regions skipped (invalid bbox or missing page)")
|
|
54267
|
+
});
|
|
54268
|
+
CropRegionsProcessorConfigSchema = TransformCropRegionsConfigSchema.omit({
|
|
54269
|
+
input: true,
|
|
54270
|
+
regions: true
|
|
54271
|
+
}).extend({
|
|
54272
|
+
regions: union([
|
|
54273
|
+
string2().min(1).describe("Template expression resolving to a region array, e.g. {{ steps.list-figures.output.regions }}"),
|
|
54274
|
+
CropRegionSpecListResolvedSchema
|
|
54275
|
+
]).describe("Regions to crop — may be empty when upstream scripts find no figures")
|
|
54276
|
+
});
|
|
54223
54277
|
TransformXlsxToJsonConfigSchema = object({
|
|
54224
54278
|
input: string2().min(1, "Input is required").describe("File input - template expression e.g. {{input.document}} resolving to a scoped $file artifact at runtime")
|
|
54225
54279
|
}).extend(XlsxToJsonConfigSchema.shape).extend({
|
|
@@ -54698,6 +54752,15 @@ var init_step_configs = __esm(() => {
|
|
|
54698
54752
|
outputSchema: TransformPdfEmbedOutputSchema,
|
|
54699
54753
|
configInWith: true
|
|
54700
54754
|
},
|
|
54755
|
+
"transform.crop-regions": {
|
|
54756
|
+
type: "transform.crop-regions",
|
|
54757
|
+
category: "transform",
|
|
54758
|
+
name: "Crop Regions",
|
|
54759
|
+
description: "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.",
|
|
54760
|
+
configSchema: TransformCropRegionsConfigSchema,
|
|
54761
|
+
outputSchema: TransformCropRegionsOutputSchema,
|
|
54762
|
+
configInWith: true
|
|
54763
|
+
},
|
|
54701
54764
|
"transform.xlsx-to-json": {
|
|
54702
54765
|
type: "transform.xlsx-to-json",
|
|
54703
54766
|
category: "transform",
|
|
@@ -206317,7 +206380,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
|
|
|
206317
206380
|
// package.json
|
|
206318
206381
|
var package_default = {
|
|
206319
206382
|
name: "@eigenpal/cli",
|
|
206320
|
-
version: "0.
|
|
206383
|
+
version: "0.18.0",
|
|
206321
206384
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
206322
206385
|
keywords: [
|
|
206323
206386
|
"eigenpal",
|