@eigenpal/cli 0.20.27 → 0.20.29

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
@@ -6684,6 +6684,14 @@ function object(shape, params) {
6684
6684
  };
6685
6685
  return new ZodObject(def);
6686
6686
  }
6687
+ function strictObject(shape, params) {
6688
+ return new ZodObject({
6689
+ type: "object",
6690
+ shape,
6691
+ catchall: never(),
6692
+ ...normalizeParams(params)
6693
+ });
6694
+ }
6687
6695
  function union(options, params) {
6688
6696
  return new ZodUnion({
6689
6697
  type: "union",
@@ -7671,6 +7679,637 @@ var require_picocolors = __commonJS(function(exports, module) {
7671
7679
  module.exports.createColors = createColors;
7672
7680
  });
7673
7681
 
7682
+ // ../types/src/client/ai-client.ts
7683
+ var REASONING_EFFORTS, ReasoningEffortSchema, ModelReasoningConfigSchema;
7684
+ var init_ai_client = __esm(() => {
7685
+ init_zod();
7686
+ REASONING_EFFORTS = [
7687
+ "none",
7688
+ "minimal",
7689
+ "low",
7690
+ "medium",
7691
+ "high",
7692
+ "xhigh",
7693
+ "max"
7694
+ ];
7695
+ ReasoningEffortSchema = _enum(REASONING_EFFORTS);
7696
+ ModelReasoningConfigSchema = object({
7697
+ supportedEfforts: array(ReasoningEffortSchema).min(1),
7698
+ defaultEffort: ReasoningEffortSchema.optional()
7699
+ }).refine((config) => config.defaultEffort === undefined || config.supportedEfforts.includes(config.defaultEffort), {
7700
+ message: "defaultEffort must be included in supportedEfforts",
7701
+ path: ["defaultEffort"]
7702
+ }).strict();
7703
+ });
7704
+
7705
+ // ../types/src/parser/native-text-quality.ts
7706
+ var NativeTextQualityStatusSchema, NativeTextQualityReasonSchema, NativeTextQualityCountsSchema, NativeTextQualityProfileSchema, NativeTextQualitySchema;
7707
+ var init_native_text_quality = __esm(() => {
7708
+ init_zod();
7709
+ NativeTextQualityStatusSchema = _enum(["clean", "empty", "suspect"]);
7710
+ NativeTextQualityReasonSchema = _enum([
7711
+ "empty",
7712
+ "replacement-character",
7713
+ "lone-surrogate",
7714
+ "forbidden-control",
7715
+ "unassigned",
7716
+ "noncharacter",
7717
+ "private-use"
7718
+ ]);
7719
+ NativeTextQualityCountsSchema = object({
7720
+ codePoints: number2().int().nonnegative(),
7721
+ nonWhitespace: number2().int().nonnegative(),
7722
+ replacement: number2().int().nonnegative(),
7723
+ loneSurrogate: number2().int().nonnegative(),
7724
+ forbiddenControl: number2().int().nonnegative(),
7725
+ unassigned: number2().int().nonnegative(),
7726
+ noncharacter: number2().int().nonnegative(),
7727
+ privateUse: number2().int().nonnegative()
7728
+ });
7729
+ NativeTextQualityProfileSchema = object({
7730
+ replacementRatio: number2().nonnegative(),
7731
+ loneSurrogateRatio: number2().nonnegative(),
7732
+ forbiddenControlRatio: number2().nonnegative(),
7733
+ unassignedRatio: number2().nonnegative(),
7734
+ noncharacterRatio: number2().nonnegative(),
7735
+ privateUseRatio: number2().nonnegative()
7736
+ });
7737
+ NativeTextQualitySchema = object({
7738
+ status: NativeTextQualityStatusSchema,
7739
+ reasons: array(NativeTextQualityReasonSchema),
7740
+ counts: NativeTextQualityCountsSchema,
7741
+ profile: NativeTextQualityProfileSchema
7742
+ });
7743
+ });
7744
+
7745
+ // ../types/src/parser/spreadsheet-evidence.ts
7746
+ var SpreadsheetCellEvidenceSchema, SpreadsheetPageEvidenceSchema;
7747
+ var init_spreadsheet_evidence = __esm(() => {
7748
+ init_zod();
7749
+ SpreadsheetCellEvidenceSchema = object({
7750
+ address: string2().describe("Original A1 cell address"),
7751
+ type: string2().describe("Excel storage type: n=number, s=string, b=boolean, e=error, d=date, z=blank. A numeric date remains type n."),
7752
+ rawValue: union([string2(), number2(), boolean2(), _null3()]).optional().describe("Stored cached value; formulas are never evaluated"),
7753
+ displayedValue: string2().describe("Value formatted using the workbook number format and date system"),
7754
+ numberFormat: string2().optional(),
7755
+ formula: string2().optional(),
7756
+ dateValue: string2().optional().describe("Calendar rendering for a valid date-formatted serial, without a timezone. Evidence of Excel formatting, not a business classification."),
7757
+ excelLeapDay: boolean2().optional().describe("True for the fictitious 1900-02-29 in the Excel 1900 date system")
7758
+ });
7759
+ SpreadsheetPageEvidenceSchema = object({
7760
+ dateSystem: _enum(["1900", "1904"]),
7761
+ declaredRange: string2().optional(),
7762
+ cells: array(SpreadsheetCellEvidenceSchema)
7763
+ });
7764
+ });
7765
+
7766
+ // ../types/src/parser/parser.ts
7767
+ function refineNativeParseModeConflicts(config, ctx) {
7768
+ if (config.parseMode === "native" && config.describeFigures === true) {
7769
+ ctx.addIssue({
7770
+ code: ZodIssueCode.custom,
7771
+ path: ["describeFigures"],
7772
+ message: 'parseMode "native" cannot be combined with describeFigures because figure captions require vision egress'
7773
+ });
7774
+ }
7775
+ }
7776
+ function isNativeLayoutCompatible(config) {
7777
+ return config.parseMode === "native" || config.parseMode === "native-or-ocr";
7778
+ }
7779
+ function refineLayoutOutputFormat(config, ctx) {
7780
+ if (config.outputFormat !== "layout")
7781
+ return;
7782
+ if (isNativeLayoutCompatible(config))
7783
+ return;
7784
+ ctx.addIssue({
7785
+ code: ZodIssueCode.custom,
7786
+ path: ["outputFormat"],
7787
+ message: LAYOUT_OUTPUT_PARSE_MODE_ERROR
7788
+ });
7789
+ }
7790
+ function mimeTypeForExtension(extension) {
7791
+ return EXTENSION_TO_MIME[extension.replace(/^\./, "").toLowerCase()];
7792
+ }
7793
+ var OFFICE_MIME_TYPES, ParserCategory, ParserTypeSchema, ParseModeSchema, PARSE_OUTPUT_FORMATS, ParseOutputFormatSchema, PageProvenanceSourceSchema, PageProvenanceSchema, ProcessingStrategySchema, LAYOUT_OUTPUT_PARSE_MODE_ERROR = 'outputFormat "layout" is native PDF-only. Set parseMode to "native" or "native-or-ocr". Omitted parseMode, OCR, vision, and nativeText: true cannot request layout.', PARSE_OUTPUT_FORMAT_DESCRIPTION = "Format for extracted text. `markdown` (default) keeps structure; `plain` is unstyled text; `djot`/`html` preserve more markup. `layout` is native-PDF spatial text with column gaps preserved as spaces. It requires `parseMode: native` or `parseMode: native-or-ocr` and a PDF — omitted parseMode and `nativeText: true` are not enough. Native mode is layout-only and fail-closed. `native-or-ocr` keeps layout text on accepted native pages and uses OCR markdown on suspect or empty pages, so the document can mix fixed-width layout and markdown. Extractor failure never falls back to another parser. Office, plaintext, and images fail. OCR/vision cannot request `layout`.", DocumentMetadataSchema, ParseUsageSchema, StructuredDocumentSchema, CoordinateUnitSchema, PointSchema, BoundingRegionSchema, PositionedTextSchema, TableCellSchema, ExtractedTableSchema, LayoutElementTypeSchema, LayoutElementSchema, PageResultSchema, ParseResultSchema, ParseOptionsSchema, ParserInputSchema, EXTENSION_TO_MIME, MIME_TO_EXTENSION;
7794
+ var init_parser = __esm(() => {
7795
+ init_zod();
7796
+ init_ai_client();
7797
+ init_native_text_quality();
7798
+ init_spreadsheet_evidence();
7799
+ OFFICE_MIME_TYPES = [
7800
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
7801
+ "application/msword",
7802
+ "application/vnd.oasis.opendocument.text",
7803
+ "application/rtf",
7804
+ "text/rtf",
7805
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
7806
+ "application/vnd.ms-excel",
7807
+ "application/vnd.ms-excel.sheet.macroenabled.12",
7808
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12",
7809
+ "application/vnd.oasis.opendocument.spreadsheet",
7810
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
7811
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
7812
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12",
7813
+ "application/vnd.ms-powerpoint",
7814
+ "application/vnd.oasis.opendocument.presentation",
7815
+ "message/rfc822",
7816
+ "application/vnd.ms-outlook",
7817
+ "application/epub+zip"
7818
+ ];
7819
+ ParserCategory = {
7820
+ PLAINTEXT: [
7821
+ "text/plain",
7822
+ "text/markdown",
7823
+ "text/csv",
7824
+ "text/tab-separated-values",
7825
+ "text/html",
7826
+ "text/xml",
7827
+ "application/json",
7828
+ "application/x-yaml",
7829
+ "application/toml",
7830
+ "image/svg+xml",
7831
+ "text/x-rst",
7832
+ "text/x-org",
7833
+ "application/x-latex",
7834
+ "application/x-ipynb+json",
7835
+ "application/x-bibtex",
7836
+ "application/docbook+xml",
7837
+ "application/x-fictionbook+xml"
7838
+ ],
7839
+ OFFICE: [...OFFICE_MIME_TYPES],
7840
+ DOCUMENT: [
7841
+ "application/pdf",
7842
+ "image/png",
7843
+ "image/jpeg",
7844
+ "image/webp",
7845
+ "image/tiff",
7846
+ "image/gif",
7847
+ "image/bmp"
7848
+ ]
7849
+ };
7850
+ ParserTypeSchema = _enum([
7851
+ "plaintext",
7852
+ "office",
7853
+ "llm-vision",
7854
+ "ocr"
7855
+ ]);
7856
+ ParseModeSchema = _enum(["ocr", "vision", "native", "native-or-ocr"]);
7857
+ PARSE_OUTPUT_FORMATS = ["plain", "markdown", "djot", "html", "layout"];
7858
+ ParseOutputFormatSchema = _enum(PARSE_OUTPUT_FORMATS);
7859
+ PageProvenanceSourceSchema = _enum(["native", "ocr", "vision"]);
7860
+ PageProvenanceSchema = object({
7861
+ source: PageProvenanceSourceSchema
7862
+ });
7863
+ ProcessingStrategySchema = _enum(["native", "ocr", "vision", "hybrid"]);
7864
+ DocumentMetadataSchema = object({
7865
+ filename: string2(),
7866
+ mimeType: string2(),
7867
+ size: number2().describe("File size in bytes"),
7868
+ storageRef: string2().optional().describe("Storage reference for the original file")
7869
+ });
7870
+ ParseUsageSchema = object({
7871
+ pageCount: number2(),
7872
+ processingTimeMs: number2().optional(),
7873
+ ocrPagesProcessed: number2().int().nonnegative().optional(),
7874
+ visionPagesProcessed: number2().int().nonnegative().optional(),
7875
+ visionPromptTokens: number2().int().nonnegative().optional(),
7876
+ visionCompletionTokens: number2().int().nonnegative().optional(),
7877
+ cached: boolean2().optional()
7878
+ });
7879
+ StructuredDocumentSchema = record(string2(), unknown());
7880
+ CoordinateUnitSchema = _enum(["pixel", "inch", "point", "normalized"]);
7881
+ PointSchema = object({
7882
+ x: number2(),
7883
+ y: number2()
7884
+ });
7885
+ BoundingRegionSchema = object({
7886
+ polygon: array(PointSchema).min(3),
7887
+ unit: CoordinateUnitSchema,
7888
+ pageIndex: number2()
7889
+ });
7890
+ PositionedTextSchema = object({
7891
+ text: string2(),
7892
+ confidence: number2().min(0).max(1).optional(),
7893
+ boundingRegion: BoundingRegionSchema.optional()
7894
+ });
7895
+ TableCellSchema = object({
7896
+ content: string2(),
7897
+ rowIndex: number2(),
7898
+ columnIndex: number2(),
7899
+ rowSpan: number2().default(1),
7900
+ columnSpan: number2().default(1),
7901
+ boundingRegion: BoundingRegionSchema.optional()
7902
+ });
7903
+ ExtractedTableSchema = object({
7904
+ cells: array(TableCellSchema),
7905
+ rowCount: number2(),
7906
+ columnCount: number2(),
7907
+ boundingRegion: BoundingRegionSchema.optional()
7908
+ });
7909
+ LayoutElementTypeSchema = _enum([
7910
+ "paragraph",
7911
+ "title",
7912
+ "sectionHeading",
7913
+ "pageHeader",
7914
+ "pageFooter",
7915
+ "pageNumber",
7916
+ "footnote",
7917
+ "table",
7918
+ "figure",
7919
+ "formulaBlock"
7920
+ ]);
7921
+ LayoutElementSchema = object({
7922
+ type: LayoutElementTypeSchema,
7923
+ content: string2(),
7924
+ table: ExtractedTableSchema.optional(),
7925
+ caption: string2().optional(),
7926
+ figureId: string2().optional(),
7927
+ boundingRegion: BoundingRegionSchema.optional()
7928
+ });
7929
+ PageResultSchema = object({
7930
+ spreadsheet: SpreadsheetPageEvidenceSchema.optional().describe("Opt-in original spreadsheet cell evidence"),
7931
+ pageIndex: number2().describe("0-based page index"),
7932
+ text: string2().describe("Extracted page text (markdown/HTML/plain, or spatial layout text)"),
7933
+ pageName: string2().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
7934
+ layoutElements: array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
7935
+ words: array(PositionedTextSchema).optional().describe("Word-level positions"),
7936
+ lines: array(PositionedTextSchema).optional().describe("Line-level positions"),
7937
+ tables: array(ExtractedTableSchema).optional().describe("Extracted tables"),
7938
+ width: number2().optional().describe("Page width"),
7939
+ height: number2().optional().describe("Page height"),
7940
+ unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
7941
+ confidence: number2().min(0).max(1).optional().describe("Overall page confidence"),
7942
+ nativeTextQuality: NativeTextQualitySchema.optional().describe('Per-page diagnosis of native-extracted text. Reports objectively detectable anomalies (empty, U+FFFD, forbidden controls, unassigned/noncharacter code points, heavy private-use). Does not certify semantic correctness — valid-looking wrong mappings and literal "?" cannot be distinguished from legitimate text.'),
7943
+ provenance: PageProvenanceSchema.optional().describe("Which extractor produced the final text/layout on this page")
7944
+ });
7945
+ ParseResultSchema = object({
7946
+ document: DocumentMetadataSchema,
7947
+ usage: ParseUsageSchema,
7948
+ pages: array(PageResultSchema),
7949
+ text: string2().describe("Combined text from all pages"),
7950
+ parserType: ParserTypeSchema,
7951
+ parserVersion: string2().optional(),
7952
+ model: string2().optional().describe("Model used (for LLM/OCR parsers)"),
7953
+ processingStrategy: ProcessingStrategySchema.optional().describe("How this result was produced: `native` (local PDF text only), `ocr`, `vision`, or `hybrid` (native pages merged with OCR on fallback pages)."),
7954
+ structured: StructuredDocumentSchema.optional().describe("Canonical structured document with ordered blocks, regions, bounding boxes, tables, figures, and chunks when supported by the parser"),
7955
+ rawResponse: unknown().optional()
7956
+ });
7957
+ ParseOptionsSchema = object({
7958
+ includeCellMetadata: boolean2().optional(),
7959
+ outputFormat: ParseOutputFormatSchema.default("markdown"),
7960
+ ocrProvider: string2().optional().describe("OCR provider ID to use"),
7961
+ includeWordPositions: boolean2().default(false),
7962
+ includeLinePositions: boolean2().default(false),
7963
+ extractTables: boolean2().default(true),
7964
+ provider: string2().optional().describe("LLM provider ID to use"),
7965
+ model: string2().optional(),
7966
+ reasoningEffort: ReasoningEffortSchema.optional(),
7967
+ maxConcurrency: number2().min(1).max(30).default(3),
7968
+ pagesPerBatch: number2().min(1).max(20).default(5),
7969
+ pdfRenderScale: number2().min(1).max(4).default(1).describe("Scale factor used when rendering PDF pages for VLM parsing"),
7970
+ imageQuality: number2().int().min(1).max(100).default(85).describe("JPEG quality used for PDF page images sent to VLM parsing"),
7971
+ prompt: string2().optional().describe("Custom prompt for LLM-based parsing"),
7972
+ languages: array(string2()).optional().describe("OCR language hints"),
7973
+ pages: array(number2().int().min(1)).optional().describe("1-indexed pages to OCR; omit or empty to analyze the whole document"),
7974
+ tenantId: string2().optional(),
7975
+ requireCompletePages: boolean2().optional()
7976
+ });
7977
+ ParserInputSchema = object({
7978
+ data: _instanceof(Buffer).or(_instanceof(Uint8Array)),
7979
+ filename: string2(),
7980
+ mimeType: string2(),
7981
+ options: ParseOptionsSchema.optional()
7982
+ });
7983
+ EXTENSION_TO_MIME = {
7984
+ docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
7985
+ doc: "application/msword",
7986
+ odt: "application/vnd.oasis.opendocument.text",
7987
+ rtf: "application/rtf",
7988
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
7989
+ xls: "application/vnd.ms-excel",
7990
+ xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
7991
+ xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
7992
+ ods: "application/vnd.oasis.opendocument.spreadsheet",
7993
+ pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
7994
+ ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
7995
+ pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
7996
+ ppt: "application/vnd.ms-powerpoint",
7997
+ odp: "application/vnd.oasis.opendocument.presentation",
7998
+ eml: "message/rfc822",
7999
+ msg: "application/vnd.ms-outlook",
8000
+ epub: "application/epub+zip",
8001
+ pdf: "application/pdf",
8002
+ png: "image/png",
8003
+ jpg: "image/jpeg",
8004
+ jpeg: "image/jpeg",
8005
+ webp: "image/webp",
8006
+ tiff: "image/tiff",
8007
+ tif: "image/tiff",
8008
+ gif: "image/gif",
8009
+ bmp: "image/bmp",
8010
+ svg: "image/svg+xml",
8011
+ txt: "text/plain",
8012
+ md: "text/markdown",
8013
+ markdown: "text/markdown",
8014
+ csv: "text/csv",
8015
+ tsv: "text/tab-separated-values",
8016
+ html: "text/html",
8017
+ htm: "text/html",
8018
+ xml: "text/xml",
8019
+ json: "application/json",
8020
+ yaml: "application/x-yaml",
8021
+ yml: "application/x-yaml",
8022
+ toml: "application/toml",
8023
+ rst: "text/x-rst",
8024
+ org: "text/x-org",
8025
+ tex: "application/x-latex",
8026
+ latex: "application/x-latex",
8027
+ ipynb: "application/x-ipynb+json",
8028
+ bib: "application/x-bibtex",
8029
+ dbk: "application/docbook+xml",
8030
+ docbook: "application/docbook+xml",
8031
+ fb2: "application/x-fictionbook+xml",
8032
+ zip: "application/zip"
8033
+ };
8034
+ MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
8035
+ if (!(mime in acc))
8036
+ acc[mime] = ext;
8037
+ return acc;
8038
+ }, {});
8039
+ });
8040
+
8041
+ // ../types/src/files/runtime-file-ref.ts
8042
+ var DbFileRefSchema, LegacyFileIdInputSchema, LocalFileRefSchema, S3FileRefSchema, InlineFileRefSchema, RuntimeFileRefSchema, FilePathDescriptorSchema, ResolvedProcessorFileSchema;
8043
+ var init_runtime_file_ref = __esm(() => {
8044
+ init_zod();
8045
+ DbFileRefSchema = object({
8046
+ kind: literal("file"),
8047
+ fileId: string2().describe("File ID from files table"),
8048
+ filename: string2().optional().describe("Original filename"),
8049
+ mimeType: string2().optional().describe("MIME type")
8050
+ });
8051
+ LegacyFileIdInputSchema = object({
8052
+ kind: never().optional(),
8053
+ fileId: string2().describe("File ID from files table"),
8054
+ filename: string2().optional().describe("Original filename"),
8055
+ mimeType: string2().optional().describe("MIME type")
8056
+ });
8057
+ LocalFileRefSchema = object({
8058
+ kind: literal("local"),
8059
+ path: string2().describe("Absolute path to a file on disk"),
8060
+ filename: string2().describe("Original filename"),
8061
+ mimeType: string2().describe("MIME type of the file")
8062
+ });
8063
+ S3FileRefSchema = object({
8064
+ kind: literal("s3"),
8065
+ ref: string2().describe("Storage key (suffix-only, prefix added by adapter)"),
8066
+ filename: string2().describe("Original filename"),
8067
+ mimeType: string2().describe("MIME type of the file")
8068
+ });
8069
+ InlineFileRefSchema = object({
8070
+ kind: literal("inline"),
8071
+ base64: string2().describe("Base64-encoded file bytes"),
8072
+ filename: string2().describe("Original filename"),
8073
+ mimeType: string2().describe("MIME type of the file")
8074
+ });
8075
+ RuntimeFileRefSchema = discriminatedUnion("kind", [
8076
+ DbFileRefSchema,
8077
+ LocalFileRefSchema,
8078
+ S3FileRefSchema,
8079
+ InlineFileRefSchema
8080
+ ]);
8081
+ FilePathDescriptorSchema = discriminatedUnion("kind", [
8082
+ LocalFileRefSchema,
8083
+ S3FileRefSchema,
8084
+ InlineFileRefSchema
8085
+ ]);
8086
+ ResolvedProcessorFileSchema = object({
8087
+ __eigenpalFile: literal(true),
8088
+ source: _enum(["db", "tenant-s3", "local", "inline"]),
8089
+ filename: string2().describe("Display filename for processor logs and parser routing"),
8090
+ mimeType: string2().describe("MIME type for processor routing"),
8091
+ fileId: string2().optional().describe("Legacy files-table id for db-backed handles"),
8092
+ ref: string2().optional().describe("Tenant-scoped storage key suffix for S3-backed handles"),
8093
+ path: string2().optional().describe("Local filesystem path for headless/CLI handles"),
8094
+ base64: string2().optional().describe("Base64 bytes for inline handles"),
8095
+ size: number2().int().nonnegative().optional().describe("Byte size when a file-producing step recorded it")
8096
+ }).strict();
8097
+ });
8098
+
8099
+ // ../types/src/processor/configs/document-parser.ts
8100
+ var DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
8101
+ var init_document_parser = __esm(() => {
8102
+ init_zod();
8103
+ init_ai_client();
8104
+ init_runtime_file_ref();
8105
+ init_parser();
8106
+ DocumentParserInputSchema = ResolvedProcessorFileSchema;
8107
+ DocumentParserOutputSchema = ParseResultSchema;
8108
+ DocumentParserConfigSchema = object({
8109
+ parseMode: ParseModeSchema.optional().describe('Base parser for PDF/image inputs. OCR is the default. `native` extracts PDF text only (never OCR/vision). `native-or-ocr` requests OCR when pages have detectable native-text anomalies (empty, U+FFFD, lone surrogates, forbidden controls, unassigned/noncharacter, heavy PUA). Page selection, subset egress, and billing are provider-dependent. Valid-looking wrong text and literal "?" are not flagged.'),
8110
+ ocrModel: string2().optional().describe("OCR provider ID for PDF/image parsing"),
8111
+ llmModel: string2().optional().describe("LLM provider ID for vision-based parsing"),
8112
+ llmReasoningEffort: ReasoningEffortSchema.optional().describe("Reasoning effort for vision-based parsing. Omit to use the model default."),
8113
+ figureModel: string2().optional().describe("Vision model used only for the optional figure-description pass"),
8114
+ figureReasoningEffort: ReasoningEffortSchema.optional().describe("Reasoning effort for figure descriptions. Omit to use the model default."),
8115
+ maxConcurrency: number2().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
8116
+ pagesPerBatch: number2().min(1).max(20).default(5).describe("Number of page images per VLM request"),
8117
+ pdfRenderScale: number2().min(1).max(4).default(1).optional().describe("Scale factor used when rendering PDF pages for VLM parsing"),
8118
+ imageQuality: number2().int().min(1).max(100).default(85).optional().describe("JPEG quality used for PDF page images sent to VLM parsing"),
8119
+ prompt: string2().optional().describe("Custom extraction prompt"),
8120
+ nativeText: boolean2().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
8121
+ 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."),
8122
+ figureInstructions: string2().optional().describe("Custom instruction for the figure-description pass."),
8123
+ languages: array(string2()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
8124
+ outputFormat: ParseOutputFormatSchema.default("markdown").optional().describe(PARSE_OUTPUT_FORMAT_DESCRIPTION),
8125
+ 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.")
8126
+ }).superRefine(refineNativeParseModeConflicts).superRefine(refineLayoutOutputFormat).prefault({});
8127
+ });
8128
+
8129
+ // ../types/src/processor/configs/document-parser-v2.ts
8130
+ var ImageReadingBackendSchema, ParseV2TextFormatSchema, ParseV2SettingsSchema, DocumentParserV2ConfigSchema, AiParseV2ConfigSchema, ParseV2PageSchema, ParseV2ResultSchema, DocumentParserV2InputSchema;
8131
+ var init_document_parser_v2 = __esm(() => {
8132
+ init_zod();
8133
+ init_ai_client();
8134
+ init_parser();
8135
+ init_document_parser();
8136
+ ImageReadingBackendSchema = _enum(["ocr", "vision"]);
8137
+ ParseV2TextFormatSchema = _enum(["plain", "markdown", "html", "djot"]);
8138
+ ParseV2SettingsSchema = strictObject({
8139
+ policy: strictObject({
8140
+ native: _enum(["prefer", "require", "skip"]).default("prefer").describe("Prefer local text extraction, require local text extraction with no image transcription, or skip native PDF extraction. Figure enrichment is independent."),
8141
+ imageReading: strictObject({
8142
+ order: array(ImageReadingBackendSchema).min(1).max(2).refine((v) => new Set(v).size === v.length, "Backends must be unique").default(["ocr", "vision"]).describe("Ordered allowed backends. A single entry prohibits the other backend.")
8143
+ }).prefault({})
8144
+ }).prefault({}),
8145
+ providers: strictObject({
8146
+ ocr: string2().min(1).optional().describe("Exact configured OCR provider ID. Missing pins fail; they never resolve to another provider."),
8147
+ vision: string2().min(1).optional().describe("Exact configured vision provider ID. Otherwise uses the deployment parsing default or vision role.")
8148
+ }).prefault({}),
8149
+ output: strictObject({
8150
+ textFormat: ParseV2TextFormatSchema.default("markdown"),
8151
+ includeCellMetadata: boolean2().default(false).describe("Include spreadsheet cell evidence in pages[].spreadsheet and annotate text for downstream extraction. Preserves raw/displayed values and workbook date system."),
8152
+ nativeWhitespace: _enum(["reading-order", "spatial"]).default("reading-order").describe("Spatial preserves native PDF column spacing. It does not promise OCR/vision coordinates."),
8153
+ require: array(_enum(["wordCoordinates", "tables"])).default([]).describe("Required evidence capabilities on nonblank pages. Backends unable to satisfy them are rejected.")
8154
+ }).prefault({}),
8155
+ enrichment: strictObject({
8156
+ figures: strictObject({
8157
+ enabled: boolean2().default(false),
8158
+ provider: string2().min(1).optional(),
8159
+ instructions: string2().optional(),
8160
+ reasoningEffort: ReasoningEffortSchema.optional()
8161
+ }).prefault({})
8162
+ }).prefault({}),
8163
+ advanced: strictObject({
8164
+ vision: strictObject({
8165
+ maxConcurrency: number2().int().min(1).max(10).default(3),
8166
+ pagesPerBatch: number2().int().min(1).max(20).default(5),
8167
+ renderScale: number2().min(1).max(4).default(2),
8168
+ imageQuality: number2().int().min(1).max(100).default(85),
8169
+ instructions: string2().optional().describe("Transcription instructions, never document-specific extraction/schema instructions."),
8170
+ reasoningEffort: ReasoningEffortSchema.optional()
8171
+ }).prefault({}),
8172
+ languages: array(string2().min(1)).optional(),
8173
+ allowPartial: boolean2().default(false).describe("Return unresolved pages explicitly instead of failing. Default false."),
8174
+ cache: boolean2().default(false)
8175
+ }).prefault({})
8176
+ }).superRefine((config, ctx) => {
8177
+ if (config.output.nativeWhitespace === "spatial" && config.output.textFormat !== "plain") {
8178
+ ctx.addIssue({
8179
+ code: "custom",
8180
+ path: ["output"],
8181
+ message: "Spatial native whitespace requires textFormat: plain."
8182
+ });
8183
+ }
8184
+ });
8185
+ DocumentParserV2ConfigSchema = ParseV2SettingsSchema.prefault({});
8186
+ AiParseV2ConfigSchema = ParseV2SettingsSchema.safeExtend({
8187
+ input: string2().min(1).describe("File reference or template expression for the document")
8188
+ });
8189
+ ParseV2PageSchema = PageResultSchema.extend({
8190
+ provenance: object({
8191
+ source: _enum(["native", "ocr", "vision"]),
8192
+ provider: string2().optional(),
8193
+ model: string2().optional(),
8194
+ reason: string2(),
8195
+ textFormat: ParseV2TextFormatSchema,
8196
+ capabilities: array(_enum(["wordCoordinates", "tables"]))
8197
+ }),
8198
+ status: _enum(["complete", "blank", "no-text", "unresolved"]),
8199
+ warnings: array(string2()).default([])
8200
+ });
8201
+ ParseV2ResultSchema = ParseResultSchema.omit({ rawResponse: true }).extend({
8202
+ parserVersion: literal("2"),
8203
+ pages: array(ParseV2PageSchema),
8204
+ completeness: object({
8205
+ status: _enum(["complete", "partial"]),
8206
+ unresolvedPageIndexes: array(number2().int().nonnegative())
8207
+ }),
8208
+ usage: ParseResultSchema.shape.usage.extend({
8209
+ visionPagesProcessed: number2().int().nonnegative()
8210
+ })
8211
+ });
8212
+ DocumentParserV2InputSchema = DocumentParserInputSchema;
8213
+ });
8214
+
8215
+ // ../types/src/processor/configs/parse-v2-migration.ts
8216
+ function migrateWorkflowParsers(definition, policy) {
8217
+ const warnings = [];
8218
+ const migratedSteps = [];
8219
+ function walk(value) {
8220
+ if (Array.isArray(value))
8221
+ return value.map(walk);
8222
+ if (!value || typeof value !== "object")
8223
+ return value;
8224
+ const record = value;
8225
+ const result = { ...record };
8226
+ for (const key of ["steps", "then", "else", "branches", "cases", "default"])
8227
+ if (Array.isArray(record[key]))
8228
+ result[key] = walk(record[key]);
8229
+ if (record.type !== "ai.parse")
8230
+ return result;
8231
+ const name = String(record.name ?? "parse");
8232
+ const config = record.with ?? {};
8233
+ const unknown = Object.keys(config).filter((k) => !LEGACY_FIELDS.has(k));
8234
+ if (unknown.length)
8235
+ throw new Error(`Cannot migrate '${name}': unsupported settings ${unknown.join(", ")}. Review them before migrating.`);
8236
+ const mode = config.parseMode;
8237
+ let native = mode === "native" ? "require" : mode === "native-or-ocr" || config.nativeText === true ? "prefer" : "skip";
8238
+ if (mode !== undefined && !["native", "ocr", "vision", "native-or-ocr"].includes(String(mode)))
8239
+ throw new Error(`Cannot migrate '${name}': unknown legacy parseMode '${String(mode)}'.`);
8240
+ let order = mode === "vision" || !mode && !config.ocrModel && config.llmModel ? ["vision"] : ["ocr"];
8241
+ if (policy === "auto") {
8242
+ if (native === "require" || order.length === 1)
8243
+ warnings.push(`${name}: automatic policy broadens allowed image-reading backends; review egress and cost restrictions.`);
8244
+ native = "prefer";
8245
+ order = ["ocr", "vision"];
8246
+ }
8247
+ if (config.nativeText)
8248
+ warnings.push(`${name}: v2 checks every page; legacy document-wide nativeText success is intentionally not preserved.`);
8249
+ if (config.outputFormat === "layout")
8250
+ warnings.push(`${name}: layout becomes plain text with spatial native whitespace. Image-reading pages use plain transcription without invented geometry.`);
8251
+ warnings.push(`${name}: completeness validation may expose unread content; compare downstream outputs before publishing.`);
8252
+ const next = {
8253
+ input: config.input,
8254
+ policy: { native, imageReading: { order } },
8255
+ providers: { ocr: config.ocrModel, vision: config.llmModel },
8256
+ output: {
8257
+ textFormat: config.outputFormat === "layout" ? "plain" : config.outputFormat ?? "markdown",
8258
+ nativeWhitespace: config.outputFormat === "layout" ? "spatial" : "reading-order"
8259
+ },
8260
+ enrichment: {
8261
+ figures: {
8262
+ enabled: config.describeFigures ?? false,
8263
+ provider: config.figureModel ?? (mode === "vision" ? config.llmModel : undefined),
8264
+ instructions: config.figureInstructions,
8265
+ reasoningEffort: config.figureReasoningEffort
8266
+ }
8267
+ },
8268
+ advanced: {
8269
+ cache: config.cache ?? false,
8270
+ languages: config.languages,
8271
+ vision: {
8272
+ maxConcurrency: config.maxConcurrency,
8273
+ pagesPerBatch: config.pagesPerBatch,
8274
+ renderScale: config.pdfRenderScale,
8275
+ imageQuality: config.imageQuality,
8276
+ instructions: config.prompt,
8277
+ reasoningEffort: config.llmReasoningEffort
8278
+ }
8279
+ }
8280
+ };
8281
+ result.type = "ai.parse-v2";
8282
+ result.with = AiParseV2ConfigSchema.parse(next);
8283
+ migratedSteps.push(name);
8284
+ return result;
8285
+ }
8286
+ return { definition: walk(definition), migratedSteps, warnings };
8287
+ }
8288
+ var LEGACY_FIELDS;
8289
+ var init_parse_v2_migration = __esm(() => {
8290
+ init_document_parser_v2();
8291
+ LEGACY_FIELDS = new Set([
8292
+ "input",
8293
+ "parseMode",
8294
+ "nativeText",
8295
+ "ocrModel",
8296
+ "llmModel",
8297
+ "llmReasoningEffort",
8298
+ "figureModel",
8299
+ "figureReasoningEffort",
8300
+ "describeFigures",
8301
+ "figureInstructions",
8302
+ "maxConcurrency",
8303
+ "pagesPerBatch",
8304
+ "pdfRenderScale",
8305
+ "imageQuality",
8306
+ "prompt",
8307
+ "languages",
8308
+ "outputFormat",
8309
+ "cache"
8310
+ ]);
8311
+ });
8312
+
7674
8313
  // ../../node_modules/nanoid/index.js
7675
8314
  import { webcrypto as crypto } from "node:crypto";
7676
8315
  function fillPool(bytes) {
@@ -7825,6 +8464,7 @@ var init_ids = __esm(() => {
7825
8464
  PROCESSOR_IDS = {
7826
8465
  MERGE: "builtin/merge",
7827
8466
  DOCUMENT_PARSER: "builtin/parser",
8467
+ DOCUMENT_PARSER_V2: "builtin/parser-v2",
7828
8468
  EXTRACT: "builtin/extract",
7829
8469
  SPLIT: "builtin/split",
7830
8470
  SEGMENT: "builtin/segment",
@@ -15179,29 +15819,6 @@ var init_scoped_file_ref = __esm(() => {
15179
15819
  ]);
15180
15820
  });
15181
15821
 
15182
- // ../types/src/client/ai-client.ts
15183
- var REASONING_EFFORTS, ReasoningEffortSchema, ModelReasoningConfigSchema;
15184
- var init_ai_client = __esm(() => {
15185
- init_zod();
15186
- REASONING_EFFORTS = [
15187
- "none",
15188
- "minimal",
15189
- "low",
15190
- "medium",
15191
- "high",
15192
- "xhigh",
15193
- "max"
15194
- ];
15195
- ReasoningEffortSchema = _enum(REASONING_EFFORTS);
15196
- ModelReasoningConfigSchema = object({
15197
- supportedEfforts: array(ReasoningEffortSchema).min(1),
15198
- defaultEffort: ReasoningEffortSchema.optional()
15199
- }).refine((config) => config.defaultEffort === undefined || config.supportedEfforts.includes(config.defaultEffort), {
15200
- message: "defaultEffort must be included in supportedEfforts",
15201
- path: ["defaultEffort"]
15202
- }).strict();
15203
- });
15204
-
15205
15822
  // ../types/src/processor/configs/classify.ts
15206
15823
  var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
15207
15824
  var init_classify = __esm(() => {
@@ -15268,402 +15885,6 @@ var init_classify_pages = __esm(() => {
15268
15885
  });
15269
15886
  });
15270
15887
 
15271
- // ../types/src/files/runtime-file-ref.ts
15272
- var DbFileRefSchema, LegacyFileIdInputSchema, LocalFileRefSchema, S3FileRefSchema, InlineFileRefSchema, RuntimeFileRefSchema, FilePathDescriptorSchema, ResolvedProcessorFileSchema;
15273
- var init_runtime_file_ref = __esm(() => {
15274
- init_zod();
15275
- DbFileRefSchema = object({
15276
- kind: literal("file"),
15277
- fileId: string2().describe("File ID from files table"),
15278
- filename: string2().optional().describe("Original filename"),
15279
- mimeType: string2().optional().describe("MIME type")
15280
- });
15281
- LegacyFileIdInputSchema = object({
15282
- kind: never().optional(),
15283
- fileId: string2().describe("File ID from files table"),
15284
- filename: string2().optional().describe("Original filename"),
15285
- mimeType: string2().optional().describe("MIME type")
15286
- });
15287
- LocalFileRefSchema = object({
15288
- kind: literal("local"),
15289
- path: string2().describe("Absolute path to a file on disk"),
15290
- filename: string2().describe("Original filename"),
15291
- mimeType: string2().describe("MIME type of the file")
15292
- });
15293
- S3FileRefSchema = object({
15294
- kind: literal("s3"),
15295
- ref: string2().describe("Storage key (suffix-only, prefix added by adapter)"),
15296
- filename: string2().describe("Original filename"),
15297
- mimeType: string2().describe("MIME type of the file")
15298
- });
15299
- InlineFileRefSchema = object({
15300
- kind: literal("inline"),
15301
- base64: string2().describe("Base64-encoded file bytes"),
15302
- filename: string2().describe("Original filename"),
15303
- mimeType: string2().describe("MIME type of the file")
15304
- });
15305
- RuntimeFileRefSchema = discriminatedUnion("kind", [
15306
- DbFileRefSchema,
15307
- LocalFileRefSchema,
15308
- S3FileRefSchema,
15309
- InlineFileRefSchema
15310
- ]);
15311
- FilePathDescriptorSchema = discriminatedUnion("kind", [
15312
- LocalFileRefSchema,
15313
- S3FileRefSchema,
15314
- InlineFileRefSchema
15315
- ]);
15316
- ResolvedProcessorFileSchema = object({
15317
- __eigenpalFile: literal(true),
15318
- source: _enum(["db", "tenant-s3", "local", "inline"]),
15319
- filename: string2().describe("Display filename for processor logs and parser routing"),
15320
- mimeType: string2().describe("MIME type for processor routing"),
15321
- fileId: string2().optional().describe("Legacy files-table id for db-backed handles"),
15322
- ref: string2().optional().describe("Tenant-scoped storage key suffix for S3-backed handles"),
15323
- path: string2().optional().describe("Local filesystem path for headless/CLI handles"),
15324
- base64: string2().optional().describe("Base64 bytes for inline handles"),
15325
- size: number2().int().nonnegative().optional().describe("Byte size when a file-producing step recorded it")
15326
- }).strict();
15327
- });
15328
-
15329
- // ../types/src/parser/native-text-quality.ts
15330
- var NativeTextQualityStatusSchema, NativeTextQualityReasonSchema, NativeTextQualityCountsSchema, NativeTextQualityProfileSchema, NativeTextQualitySchema;
15331
- var init_native_text_quality = __esm(() => {
15332
- init_zod();
15333
- NativeTextQualityStatusSchema = _enum(["clean", "empty", "suspect"]);
15334
- NativeTextQualityReasonSchema = _enum([
15335
- "empty",
15336
- "replacement-character",
15337
- "lone-surrogate",
15338
- "forbidden-control",
15339
- "unassigned",
15340
- "noncharacter",
15341
- "private-use"
15342
- ]);
15343
- NativeTextQualityCountsSchema = object({
15344
- codePoints: number2().int().nonnegative(),
15345
- nonWhitespace: number2().int().nonnegative(),
15346
- replacement: number2().int().nonnegative(),
15347
- loneSurrogate: number2().int().nonnegative(),
15348
- forbiddenControl: number2().int().nonnegative(),
15349
- unassigned: number2().int().nonnegative(),
15350
- noncharacter: number2().int().nonnegative(),
15351
- privateUse: number2().int().nonnegative()
15352
- });
15353
- NativeTextQualityProfileSchema = object({
15354
- replacementRatio: number2().nonnegative(),
15355
- loneSurrogateRatio: number2().nonnegative(),
15356
- forbiddenControlRatio: number2().nonnegative(),
15357
- unassignedRatio: number2().nonnegative(),
15358
- noncharacterRatio: number2().nonnegative(),
15359
- privateUseRatio: number2().nonnegative()
15360
- });
15361
- NativeTextQualitySchema = object({
15362
- status: NativeTextQualityStatusSchema,
15363
- reasons: array(NativeTextQualityReasonSchema),
15364
- counts: NativeTextQualityCountsSchema,
15365
- profile: NativeTextQualityProfileSchema
15366
- });
15367
- });
15368
-
15369
- // ../types/src/parser/parser.ts
15370
- function refineNativeParseModeConflicts(config, ctx) {
15371
- if (config.parseMode === "native" && config.describeFigures === true) {
15372
- ctx.addIssue({
15373
- code: ZodIssueCode.custom,
15374
- path: ["describeFigures"],
15375
- message: 'parseMode "native" cannot be combined with describeFigures because figure captions require vision egress'
15376
- });
15377
- }
15378
- }
15379
- function isNativeLayoutCompatible(config) {
15380
- return config.parseMode === "native" || config.parseMode === "native-or-ocr";
15381
- }
15382
- function refineLayoutOutputFormat(config, ctx) {
15383
- if (config.outputFormat !== "layout")
15384
- return;
15385
- if (isNativeLayoutCompatible(config))
15386
- return;
15387
- ctx.addIssue({
15388
- code: ZodIssueCode.custom,
15389
- path: ["outputFormat"],
15390
- message: LAYOUT_OUTPUT_PARSE_MODE_ERROR
15391
- });
15392
- }
15393
- function mimeTypeForExtension(extension) {
15394
- return EXTENSION_TO_MIME[extension.replace(/^\./, "").toLowerCase()];
15395
- }
15396
- var OFFICE_MIME_TYPES, ParserCategory, ParserTypeSchema, ParseModeSchema, PARSE_OUTPUT_FORMATS, ParseOutputFormatSchema, PageProvenanceSourceSchema, PageProvenanceSchema, ProcessingStrategySchema, LAYOUT_OUTPUT_PARSE_MODE_ERROR = 'outputFormat "layout" is native PDF-only. Set parseMode to "native" or "native-or-ocr". Omitted parseMode, OCR, vision, and nativeText: true cannot request layout.', PARSE_OUTPUT_FORMAT_DESCRIPTION = "Format for extracted text. `markdown` (default) keeps structure; `plain` is unstyled text; `djot`/`html` preserve more markup. `layout` is native-PDF spatial text with column gaps preserved as spaces. It requires `parseMode: native` or `parseMode: native-or-ocr` and a PDF — omitted parseMode and `nativeText: true` are not enough. Native mode is layout-only and fail-closed. `native-or-ocr` keeps layout text on accepted native pages and uses OCR markdown on suspect or empty pages, so the document can mix fixed-width layout and markdown. Extractor failure never falls back to another parser. Office, plaintext, and images fail. OCR/vision cannot request `layout`.", DocumentMetadataSchema, ParseUsageSchema, StructuredDocumentSchema, CoordinateUnitSchema, PointSchema, BoundingRegionSchema, PositionedTextSchema, TableCellSchema, ExtractedTableSchema, LayoutElementTypeSchema, LayoutElementSchema, PageResultSchema, ParseResultSchema, ParseOptionsSchema, ParserInputSchema, EXTENSION_TO_MIME, MIME_TO_EXTENSION;
15397
- var init_parser = __esm(() => {
15398
- init_zod();
15399
- init_ai_client();
15400
- init_native_text_quality();
15401
- OFFICE_MIME_TYPES = [
15402
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
15403
- "application/msword",
15404
- "application/vnd.oasis.opendocument.text",
15405
- "application/rtf",
15406
- "text/rtf",
15407
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
15408
- "application/vnd.ms-excel",
15409
- "application/vnd.ms-excel.sheet.macroenabled.12",
15410
- "application/vnd.ms-excel.sheet.binary.macroenabled.12",
15411
- "application/vnd.oasis.opendocument.spreadsheet",
15412
- "application/vnd.openxmlformats-officedocument.presentationml.presentation",
15413
- "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
15414
- "application/vnd.ms-powerpoint.presentation.macroenabled.12",
15415
- "application/vnd.ms-powerpoint",
15416
- "application/vnd.oasis.opendocument.presentation",
15417
- "message/rfc822",
15418
- "application/vnd.ms-outlook",
15419
- "application/epub+zip"
15420
- ];
15421
- ParserCategory = {
15422
- PLAINTEXT: [
15423
- "text/plain",
15424
- "text/markdown",
15425
- "text/csv",
15426
- "text/tab-separated-values",
15427
- "text/html",
15428
- "text/xml",
15429
- "application/json",
15430
- "application/x-yaml",
15431
- "application/toml",
15432
- "image/svg+xml",
15433
- "text/x-rst",
15434
- "text/x-org",
15435
- "application/x-latex",
15436
- "application/x-ipynb+json",
15437
- "application/x-bibtex",
15438
- "application/docbook+xml",
15439
- "application/x-fictionbook+xml"
15440
- ],
15441
- OFFICE: [...OFFICE_MIME_TYPES],
15442
- DOCUMENT: [
15443
- "application/pdf",
15444
- "image/png",
15445
- "image/jpeg",
15446
- "image/webp",
15447
- "image/tiff",
15448
- "image/gif",
15449
- "image/bmp"
15450
- ]
15451
- };
15452
- ParserTypeSchema = _enum([
15453
- "plaintext",
15454
- "office",
15455
- "llm-vision",
15456
- "ocr"
15457
- ]);
15458
- ParseModeSchema = _enum(["ocr", "vision", "native", "native-or-ocr"]);
15459
- PARSE_OUTPUT_FORMATS = ["plain", "markdown", "djot", "html", "layout"];
15460
- ParseOutputFormatSchema = _enum(PARSE_OUTPUT_FORMATS);
15461
- PageProvenanceSourceSchema = _enum(["native", "ocr", "vision"]);
15462
- PageProvenanceSchema = object({
15463
- source: PageProvenanceSourceSchema
15464
- });
15465
- ProcessingStrategySchema = _enum(["native", "ocr", "vision", "hybrid"]);
15466
- DocumentMetadataSchema = object({
15467
- filename: string2(),
15468
- mimeType: string2(),
15469
- size: number2().describe("File size in bytes"),
15470
- storageRef: string2().optional().describe("Storage reference for the original file")
15471
- });
15472
- ParseUsageSchema = object({
15473
- pageCount: number2(),
15474
- processingTimeMs: number2().optional(),
15475
- ocrPagesProcessed: number2().int().nonnegative().optional(),
15476
- cached: boolean2().optional()
15477
- });
15478
- StructuredDocumentSchema = record(string2(), unknown());
15479
- CoordinateUnitSchema = _enum(["pixel", "inch", "point", "normalized"]);
15480
- PointSchema = object({
15481
- x: number2(),
15482
- y: number2()
15483
- });
15484
- BoundingRegionSchema = object({
15485
- polygon: array(PointSchema).min(3),
15486
- unit: CoordinateUnitSchema,
15487
- pageIndex: number2()
15488
- });
15489
- PositionedTextSchema = object({
15490
- text: string2(),
15491
- confidence: number2().min(0).max(1).optional(),
15492
- boundingRegion: BoundingRegionSchema.optional()
15493
- });
15494
- TableCellSchema = object({
15495
- content: string2(),
15496
- rowIndex: number2(),
15497
- columnIndex: number2(),
15498
- rowSpan: number2().default(1),
15499
- columnSpan: number2().default(1),
15500
- boundingRegion: BoundingRegionSchema.optional()
15501
- });
15502
- ExtractedTableSchema = object({
15503
- cells: array(TableCellSchema),
15504
- rowCount: number2(),
15505
- columnCount: number2(),
15506
- boundingRegion: BoundingRegionSchema.optional()
15507
- });
15508
- LayoutElementTypeSchema = _enum([
15509
- "paragraph",
15510
- "title",
15511
- "sectionHeading",
15512
- "pageHeader",
15513
- "pageFooter",
15514
- "pageNumber",
15515
- "footnote",
15516
- "table",
15517
- "figure",
15518
- "formulaBlock"
15519
- ]);
15520
- LayoutElementSchema = object({
15521
- type: LayoutElementTypeSchema,
15522
- content: string2(),
15523
- table: ExtractedTableSchema.optional(),
15524
- caption: string2().optional(),
15525
- figureId: string2().optional(),
15526
- boundingRegion: BoundingRegionSchema.optional()
15527
- });
15528
- PageResultSchema = object({
15529
- pageIndex: number2().describe("0-based page index"),
15530
- text: string2().describe("Extracted page text (markdown/HTML/plain, or spatial layout text)"),
15531
- pageName: string2().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
15532
- layoutElements: array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
15533
- words: array(PositionedTextSchema).optional().describe("Word-level positions"),
15534
- lines: array(PositionedTextSchema).optional().describe("Line-level positions"),
15535
- tables: array(ExtractedTableSchema).optional().describe("Extracted tables"),
15536
- width: number2().optional().describe("Page width"),
15537
- height: number2().optional().describe("Page height"),
15538
- unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
15539
- confidence: number2().min(0).max(1).optional().describe("Overall page confidence"),
15540
- nativeTextQuality: NativeTextQualitySchema.optional().describe('Per-page diagnosis of native-extracted text. Reports objectively detectable anomalies (empty, U+FFFD, forbidden controls, unassigned/noncharacter code points, heavy private-use). Does not certify semantic correctness — valid-looking wrong mappings and literal "?" cannot be distinguished from legitimate text.'),
15541
- provenance: PageProvenanceSchema.optional().describe("Which extractor produced the final text/layout on this page")
15542
- });
15543
- ParseResultSchema = object({
15544
- document: DocumentMetadataSchema,
15545
- usage: ParseUsageSchema,
15546
- pages: array(PageResultSchema),
15547
- text: string2().describe("Combined text from all pages"),
15548
- parserType: ParserTypeSchema,
15549
- parserVersion: string2().optional(),
15550
- model: string2().optional().describe("Model used (for LLM/OCR parsers)"),
15551
- processingStrategy: ProcessingStrategySchema.optional().describe("How this result was produced: `native` (local PDF text only), `ocr`, `vision`, or `hybrid` (native pages merged with OCR on fallback pages)."),
15552
- structured: StructuredDocumentSchema.optional().describe("Canonical structured document with ordered blocks, regions, bounding boxes, tables, figures, and chunks when supported by the parser"),
15553
- rawResponse: unknown().optional()
15554
- });
15555
- ParseOptionsSchema = object({
15556
- outputFormat: ParseOutputFormatSchema.default("markdown"),
15557
- ocrProvider: string2().optional().describe("OCR provider ID to use"),
15558
- includeWordPositions: boolean2().default(false),
15559
- includeLinePositions: boolean2().default(false),
15560
- extractTables: boolean2().default(true),
15561
- provider: string2().optional().describe("LLM provider ID to use"),
15562
- model: string2().optional(),
15563
- reasoningEffort: ReasoningEffortSchema.optional(),
15564
- maxConcurrency: number2().min(1).max(30).default(3),
15565
- pagesPerBatch: number2().min(1).max(20).default(5),
15566
- pdfRenderScale: number2().min(1).max(4).default(1).describe("Scale factor used when rendering PDF pages for VLM parsing"),
15567
- imageQuality: number2().int().min(1).max(100).default(85).describe("JPEG quality used for PDF page images sent to VLM parsing"),
15568
- prompt: string2().optional().describe("Custom prompt for LLM-based parsing"),
15569
- languages: array(string2()).optional().describe("OCR language hints"),
15570
- pages: array(number2().int().min(1)).optional().describe("1-indexed pages to OCR; omit or empty to analyze the whole document"),
15571
- tenantId: string2().optional()
15572
- });
15573
- ParserInputSchema = object({
15574
- data: _instanceof(Buffer).or(_instanceof(Uint8Array)),
15575
- filename: string2(),
15576
- mimeType: string2(),
15577
- options: ParseOptionsSchema.optional()
15578
- });
15579
- EXTENSION_TO_MIME = {
15580
- docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
15581
- doc: "application/msword",
15582
- odt: "application/vnd.oasis.opendocument.text",
15583
- rtf: "application/rtf",
15584
- xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
15585
- xls: "application/vnd.ms-excel",
15586
- xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
15587
- xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
15588
- ods: "application/vnd.oasis.opendocument.spreadsheet",
15589
- pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
15590
- ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
15591
- pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
15592
- ppt: "application/vnd.ms-powerpoint",
15593
- odp: "application/vnd.oasis.opendocument.presentation",
15594
- eml: "message/rfc822",
15595
- msg: "application/vnd.ms-outlook",
15596
- epub: "application/epub+zip",
15597
- pdf: "application/pdf",
15598
- png: "image/png",
15599
- jpg: "image/jpeg",
15600
- jpeg: "image/jpeg",
15601
- webp: "image/webp",
15602
- tiff: "image/tiff",
15603
- tif: "image/tiff",
15604
- gif: "image/gif",
15605
- bmp: "image/bmp",
15606
- svg: "image/svg+xml",
15607
- txt: "text/plain",
15608
- md: "text/markdown",
15609
- markdown: "text/markdown",
15610
- csv: "text/csv",
15611
- tsv: "text/tab-separated-values",
15612
- html: "text/html",
15613
- htm: "text/html",
15614
- xml: "text/xml",
15615
- json: "application/json",
15616
- yaml: "application/x-yaml",
15617
- yml: "application/x-yaml",
15618
- toml: "application/toml",
15619
- rst: "text/x-rst",
15620
- org: "text/x-org",
15621
- tex: "application/x-latex",
15622
- latex: "application/x-latex",
15623
- ipynb: "application/x-ipynb+json",
15624
- bib: "application/x-bibtex",
15625
- dbk: "application/docbook+xml",
15626
- docbook: "application/docbook+xml",
15627
- fb2: "application/x-fictionbook+xml",
15628
- zip: "application/zip"
15629
- };
15630
- MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
15631
- if (!(mime in acc))
15632
- acc[mime] = ext;
15633
- return acc;
15634
- }, {});
15635
- });
15636
-
15637
- // ../types/src/processor/configs/document-parser.ts
15638
- var DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
15639
- var init_document_parser = __esm(() => {
15640
- init_zod();
15641
- init_ai_client();
15642
- init_runtime_file_ref();
15643
- init_parser();
15644
- DocumentParserInputSchema = ResolvedProcessorFileSchema;
15645
- DocumentParserOutputSchema = ParseResultSchema;
15646
- DocumentParserConfigSchema = object({
15647
- parseMode: ParseModeSchema.optional().describe('Base parser for PDF/image inputs. OCR is the default. `native` extracts PDF text only (never OCR/vision). `native-or-ocr` requests OCR when pages have detectable native-text anomalies (empty, U+FFFD, lone surrogates, forbidden controls, unassigned/noncharacter, heavy PUA). Page selection, subset egress, and billing are provider-dependent. Valid-looking wrong text and literal "?" are not flagged.'),
15648
- ocrModel: string2().optional().describe("OCR provider ID for PDF/image parsing"),
15649
- llmModel: string2().optional().describe("LLM provider ID for vision-based parsing"),
15650
- llmReasoningEffort: ReasoningEffortSchema.optional().describe("Reasoning effort for vision-based parsing. Omit to use the model default."),
15651
- figureModel: string2().optional().describe("Vision model used only for the optional figure-description pass"),
15652
- figureReasoningEffort: ReasoningEffortSchema.optional().describe("Reasoning effort for figure descriptions. Omit to use the model default."),
15653
- maxConcurrency: number2().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
15654
- pagesPerBatch: number2().min(1).max(20).default(5).describe("Number of page images per VLM request"),
15655
- pdfRenderScale: number2().min(1).max(4).default(1).optional().describe("Scale factor used when rendering PDF pages for VLM parsing"),
15656
- imageQuality: number2().int().min(1).max(100).default(85).optional().describe("JPEG quality used for PDF page images sent to VLM parsing"),
15657
- prompt: string2().optional().describe("Custom extraction prompt"),
15658
- nativeText: boolean2().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
15659
- 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."),
15660
- figureInstructions: string2().optional().describe("Custom instruction for the figure-description pass."),
15661
- languages: array(string2()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
15662
- outputFormat: ParseOutputFormatSchema.default("markdown").optional().describe(PARSE_OUTPUT_FORMAT_DESCRIPTION),
15663
- 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.")
15664
- }).superRefine(refineNativeParseModeConflicts).superRefine(refineLayoutOutputFormat).prefault({});
15665
- });
15666
-
15667
15888
  // ../types/src/processor/configs/extract.ts
15668
15889
  var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
15669
15890
  var init_extract = __esm(() => {
@@ -16044,6 +16265,7 @@ var XLSX_TO_JSON_DEFAULT_LIMITS, A1_RANGE_RE, XlsxToJsonColumnSchema, XlsxToJson
16044
16265
  var init_xlsx_to_json = __esm(() => {
16045
16266
  init_zod();
16046
16267
  init_runtime_file_ref();
16268
+ init_spreadsheet_evidence();
16047
16269
  XLSX_TO_JSON_DEFAULT_LIMITS = {
16048
16270
  maxInputBytes: 50 * 1024 * 1024,
16049
16271
  maxRows: 1e5,
@@ -16082,6 +16304,8 @@ var init_xlsx_to_json = __esm(() => {
16082
16304
  XlsxToJsonInputSchema = ResolvedProcessorFileSchema;
16083
16305
  XlsxToJsonSheetMetaSchema = object({
16084
16306
  name: string2().describe("Selected sheet name"),
16307
+ declaredRange: string2().optional().describe("Worksheet declared extent before empty trailing rows/columns were removed"),
16308
+ dateSystem: _enum(["1900", "1904"]).optional().describe("Workbook Excel date system"),
16085
16309
  index: number2().int().min(0).describe("0-based sheet index in the workbook"),
16086
16310
  range: string2().describe("Effective rectangular A1 range that was read"),
16087
16311
  rowCount: number2().int().min(0).describe("Number of data rows returned in rows"),
@@ -16096,15 +16320,20 @@ var init_xlsx_to_json = __esm(() => {
16096
16320
  column: number2().int().optional().describe("0-based worksheet column when applicable")
16097
16321
  });
16098
16322
  XlsxToJsonOutputSchema = object({
16323
+ cellMetadata: array(SpreadsheetCellEvidenceSchema.extend({
16324
+ key: string2(),
16325
+ outputRowIndex: number2().int().nonnegative()
16326
+ })).optional().describe("Evidence for nonblank projected data cells, linked to rows by outputRowIndex and key. Present when includeCellMetadata is true."),
16099
16327
  rows: array(record(string2(), unknown())).describe("Array of row objects (first row = headers as keys unless headerRow is false)"),
16100
16328
  fileId: string2().optional().describe("File ID of stored CSV when outputCsv is true"),
16101
- sheet: XlsxToJsonSheetMetaSchema.optional().describe("Selected sheet metadata after projection. Present only when includeMetadata is true."),
16102
- diagnostics: array(XlsxToJsonDiagnosticSchema).optional().describe("Non-fatal warnings collected while reading the sheet. Present only when includeMetadata is true. Warnings are still logged when metadata is omitted.")
16329
+ sheet: XlsxToJsonSheetMetaSchema.optional().describe("Selected sheet metadata after projection. Present when includeMetadata or includeCellMetadata is true."),
16330
+ diagnostics: array(XlsxToJsonDiagnosticSchema).optional().describe("Non-fatal warnings collected while reading the sheet. Present when includeMetadata or includeCellMetadata is true. Warnings are still logged when metadata is omitted.")
16103
16331
  });
16104
16332
  XlsxToJsonConfigSchema = object({
16105
16333
  sheet: union([number2().int().min(0), string2()]).optional().describe("Sheet to read: 0-based index or exact sheet name. Omit for the first sheet."),
16106
- outputCsv: boolean2().default(false).optional().describe("If true, also write CSV to storage and include fileId. Zero-config uses the historical full-sheet SheetJS CSV. When columns, range, headerRow, valueMode, blankCells, or blankRows are set, CSV matches that projection."),
16107
- includeMetadata: boolean2().default(false).optional().describe("If true, include sheet metadata and diagnostics in the step output. Omit to keep output as rows (and fileId when outputCsv is true). Warnings are still logged when this is false."),
16334
+ outputCsv: boolean2().default(false).optional().describe("If true, also write CSV to storage and include fileId. Zero-config uses SheetJS CSV of the effective sheet extent, excluding empty trailing rows and columns. When columns, range, headerRow, valueMode, blankCells, or blankRows are set, CSV matches that projection."),
16335
+ includeCellMetadata: boolean2().default(false).optional().describe("Include original cell address, type, raw/displayed value, number format and date rendering. Also includes sheet metadata with the workbook date system. Does not classify identifiers or clean names."),
16336
+ includeMetadata: boolean2().default(false).optional().describe("If true, include sheet metadata and diagnostics in the step output. includeCellMetadata also enables these. Omit to keep output as rows (and fileId when outputCsv is true). Warnings are still logged when this is false."),
16108
16337
  outputFilename: string2().optional().describe("Output CSV filename when outputCsv is true"),
16109
16338
  headerRow: union([literal(false), number2().int().min(1)]).optional().describe("Header row: a positive 1-based Excel row, or false to keep the first effective row as data. Omit to use the first effective row as the header. When range is set and this is omitted, the first range row is the header."),
16110
16339
  columns: array(XlsxToJsonColumnSchema).min(1).optional().superRefine(refineUniqueOutputKeys).describe("Ordered output columns. Each item needs a key and exactly one source: index (0-based absolute column) or header (exact displayed header text). Named header sources require a header row. Omit to keep every column in the effective range."),
@@ -16127,6 +16356,7 @@ var init_xlsx_to_json = __esm(() => {
16127
16356
  var PROCESSOR_SCHEMAS;
16128
16357
  var init_configs = __esm(() => {
16129
16358
  init_ids();
16359
+ init_document_parser_v2();
16130
16360
  init_classify();
16131
16361
  init_classify_pages();
16132
16362
  init_document_parser();
@@ -16141,6 +16371,7 @@ var init_configs = __esm(() => {
16141
16371
  init_classify();
16142
16372
  init_classify_pages();
16143
16373
  init_document_parser();
16374
+ init_document_parser_v2();
16144
16375
  init_extract();
16145
16376
  init_json_to_xlsx();
16146
16377
  init_merge();
@@ -16150,6 +16381,12 @@ var init_configs = __esm(() => {
16150
16381
  init_template();
16151
16382
  init_xlsx_to_json();
16152
16383
  PROCESSOR_SCHEMAS = {
16384
+ [PROCESSOR_IDS.DOCUMENT_PARSER_V2]: {
16385
+ id: PROCESSOR_IDS.DOCUMENT_PARSER_V2,
16386
+ inputSchema: DocumentParserV2InputSchema,
16387
+ outputSchema: ParseV2ResultSchema,
16388
+ configSchema: DocumentParserV2ConfigSchema
16389
+ },
16153
16390
  [PROCESSOR_IDS.EXTRACT]: {
16154
16391
  id: PROCESSOR_IDS.EXTRACT,
16155
16392
  inputSchema: ExtractInputSchema,
@@ -16294,6 +16531,259 @@ var init_run_expand = __esm(() => {
16294
16531
  };
16295
16532
  });
16296
16533
 
16534
+ // ../types/src/file-source/resolver.ts
16535
+ var init_resolver = () => {};
16536
+
16537
+ // ../types/src/file-source/reference.ts
16538
+ var init_reference = () => {};
16539
+
16540
+ // ../types/src/file-source/descriptor.ts
16541
+ function isHttpsOrLocal(value) {
16542
+ if (typeof value !== "string")
16543
+ return true;
16544
+ try {
16545
+ const url = new URL(value.trim());
16546
+ return url.protocol !== "http:" || LOCAL_HOSTS.has(url.hostname);
16547
+ } catch {
16548
+ return true;
16549
+ }
16550
+ }
16551
+ function isSet(config, key) {
16552
+ const value = config[key];
16553
+ return value !== undefined && value !== "";
16554
+ }
16555
+ function allowedContainersField(plural) {
16556
+ return {
16557
+ key: "allowedContainers",
16558
+ label: `Allowed ${plural}`,
16559
+ type: "string",
16560
+ required: false,
16561
+ description: `Comma-separated. Runs can only fetch from these ${plural}. Leave blank to allow any the credentials can read.`
16562
+ };
16563
+ }
16564
+ function transferLimitFields(remote) {
16565
+ return [
16566
+ {
16567
+ key: "timeoutMs",
16568
+ label: "Timeout (ms)",
16569
+ type: "number",
16570
+ required: false,
16571
+ description: `How long to wait for the ${remote} before giving up.`,
16572
+ default: 30000,
16573
+ advanced: true
16574
+ },
16575
+ {
16576
+ key: "maxFileBytes",
16577
+ label: "Max file size (bytes)",
16578
+ type: "number",
16579
+ required: false,
16580
+ description: "Reject files larger than this. At most 1 GiB.",
16581
+ default: 50 * 1024 * 1024,
16582
+ advanced: true
16583
+ }
16584
+ ];
16585
+ }
16586
+ var LOCAL_HOSTS, GPFS_FILE_SOURCE_NAME = "gpfs", GPFS_FILE_SOURCE_DESCRIPTOR, S3_FILE_SOURCE_NAME = "s3", S3_FILE_SOURCE_DESCRIPTOR, AZURE_BLOB_FILE_SOURCE_NAME = "azure-blob", AZURE_BLOB_FILE_SOURCE_DESCRIPTOR;
16587
+ var init_descriptor = __esm(() => {
16588
+ LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "[::1]"]);
16589
+ GPFS_FILE_SOURCE_DESCRIPTOR = {
16590
+ name: GPFS_FILE_SOURCE_NAME,
16591
+ label: "GPFS file registry",
16592
+ description: "Fetch documents from a GPFS/GFR HTTP file registry by stack and file id.",
16593
+ referenceFormat: "stackId/fileId",
16594
+ referenceParts: { container: "stackId", id: "fileId" },
16595
+ configFields: [
16596
+ {
16597
+ key: "baseUrl",
16598
+ label: "Base URL",
16599
+ type: "string",
16600
+ required: true,
16601
+ description: "Registry URL without a stack. Files are fetched from <base URL>/<stackId>/<fileId>/content.",
16602
+ placeholder: "https://files.example.com/ims/gfr"
16603
+ },
16604
+ {
16605
+ key: "defaultStack",
16606
+ label: "Default stack",
16607
+ type: "string",
16608
+ required: false,
16609
+ description: "Stack used when a run passes only a file id. Leave blank if the base URL already ends in a stack."
16610
+ },
16611
+ allowedContainersField("stacks"),
16612
+ {
16613
+ key: "authToken",
16614
+ label: "Bearer token",
16615
+ type: "secret",
16616
+ required: false,
16617
+ description: "Bearer token for the registry, if it requires one."
16618
+ },
16619
+ {
16620
+ key: "insecureSkipTlsVerify",
16621
+ label: "Skip TLS verification",
16622
+ type: "boolean",
16623
+ required: false,
16624
+ description: "Only for registries with self-signed or legacy certificates. Prefer installing your CA instead.",
16625
+ default: false,
16626
+ advanced: true
16627
+ },
16628
+ ...transferLimitFields("registry")
16629
+ ]
16630
+ };
16631
+ S3_FILE_SOURCE_DESCRIPTOR = {
16632
+ name: S3_FILE_SOURCE_NAME,
16633
+ label: "Amazon S3",
16634
+ description: "Fetch documents from Amazon S3 or S3-compatible storage by bucket and key.",
16635
+ referenceFormat: "bucket/key",
16636
+ referenceParts: { container: "bucket", id: "key" },
16637
+ check: (config) => {
16638
+ const keyId = isSet(config, "accessKeyId");
16639
+ const secret = isSet(config, "secretAccessKey");
16640
+ if (keyId !== secret)
16641
+ return ["Set both the access key ID and the secret access key"];
16642
+ if (!keyId && !isSet(config, "roleArn"))
16643
+ return ["Set an access key or a role ARN"];
16644
+ return [];
16645
+ },
16646
+ configFields: [
16647
+ {
16648
+ key: "region",
16649
+ label: "Region",
16650
+ type: "string",
16651
+ required: true,
16652
+ default: "us-east-1",
16653
+ description: "AWS region of the bucket. Most S3-compatible stores accept us-east-1."
16654
+ },
16655
+ allowedContainersField("buckets"),
16656
+ {
16657
+ key: "accessKeyId",
16658
+ label: "Access key ID",
16659
+ type: "string",
16660
+ required: false,
16661
+ description: "Required unless a role ARN is set."
16662
+ },
16663
+ {
16664
+ key: "secretAccessKey",
16665
+ label: "Secret access key",
16666
+ type: "secret",
16667
+ required: false,
16668
+ description: "Use a key that can only read the buckets EigenPal should fetch from."
16669
+ },
16670
+ {
16671
+ key: "roleArn",
16672
+ label: "Role ARN",
16673
+ type: "string",
16674
+ required: false,
16675
+ description: "AWS role to assume for reading objects. Without an access key, the worker identity is used only to assume it.",
16676
+ placeholder: "arn:aws:iam::123456789012:role/eigenpal-documents-read",
16677
+ advanced: true
16678
+ },
16679
+ {
16680
+ key: "externalId",
16681
+ label: "External ID",
16682
+ type: "string",
16683
+ required: false,
16684
+ description: "External ID the role trust policy requires, if any.",
16685
+ advanced: true
16686
+ },
16687
+ {
16688
+ key: "stsEndpointUrl",
16689
+ label: "STS endpoint URL",
16690
+ type: "string",
16691
+ required: false,
16692
+ description: "Where to assume the role. Leave blank for AWS; set it for S3-compatible storage with STS, such as MinIO.",
16693
+ advanced: true
16694
+ },
16695
+ {
16696
+ key: "sessionToken",
16697
+ label: "Session token",
16698
+ type: "secret",
16699
+ required: false,
16700
+ description: "Only for temporary access keys.",
16701
+ advanced: true
16702
+ },
16703
+ {
16704
+ key: "endpointUrl",
16705
+ label: "Endpoint URL",
16706
+ type: "string",
16707
+ required: false,
16708
+ description: "Only for S3-compatible storage such as MinIO or Ceph. Leave blank for AWS.",
16709
+ placeholder: "https://minio.example.com",
16710
+ advanced: true
16711
+ },
16712
+ ...transferLimitFields("storage")
16713
+ ]
16714
+ };
16715
+ AZURE_BLOB_FILE_SOURCE_DESCRIPTOR = {
16716
+ name: AZURE_BLOB_FILE_SOURCE_NAME,
16717
+ label: "Azure Blob Storage",
16718
+ description: "Fetch documents from Azure Blob Storage by container and blob name.",
16719
+ referenceFormat: "container/blobName",
16720
+ referenceParts: { container: "container", id: "blobName" },
16721
+ check: (config) => {
16722
+ const principal = ["tenantId", "clientId", "clientSecret"].filter((k) => isSet(config, k));
16723
+ const sas = isSet(config, "sasToken");
16724
+ if (principal.length > 0 && sas)
16725
+ return ["Use either the service principal or the SAS token, not both"];
16726
+ if (principal.length > 0 && principal.length < 3) {
16727
+ return ["A service principal needs the tenant ID, client ID and client secret"];
16728
+ }
16729
+ if (principal.length === 0 && !sas)
16730
+ return ["Set a service principal or a SAS token"];
16731
+ if (!isHttpsOrLocal(config.accountUrl)) {
16732
+ return ["The account URL must use HTTPS (HTTP only for a local emulator)"];
16733
+ }
16734
+ return [];
16735
+ },
16736
+ configFields: [
16737
+ {
16738
+ key: "accountUrl",
16739
+ label: "Account URL",
16740
+ type: "string",
16741
+ required: true,
16742
+ description: "Blob service URL of the storage account.",
16743
+ placeholder: "https://myaccount.blob.core.windows.net"
16744
+ },
16745
+ allowedContainersField("containers"),
16746
+ {
16747
+ key: "tenantId",
16748
+ label: "Entra tenant ID",
16749
+ type: "string",
16750
+ required: false,
16751
+ description: "Service principal sign-in. Set tenant, client ID and client secret, or a SAS token instead."
16752
+ },
16753
+ {
16754
+ key: "clientId",
16755
+ label: "Client ID",
16756
+ type: "string",
16757
+ required: false
16758
+ },
16759
+ {
16760
+ key: "clientSecret",
16761
+ label: "Client secret",
16762
+ type: "secret",
16763
+ required: false,
16764
+ description: "The service principal needs the Storage Blob Data Reader role."
16765
+ },
16766
+ {
16767
+ key: "sasToken",
16768
+ label: "SAS token",
16769
+ type: "secret",
16770
+ required: false,
16771
+ description: "Alternative to a service principal: a SAS token with read permission."
16772
+ },
16773
+ {
16774
+ key: "authorityHost",
16775
+ label: "Authority host",
16776
+ type: "string",
16777
+ required: false,
16778
+ description: "Only for sovereign clouds, for example Azure Government.",
16779
+ default: "https://login.microsoftonline.com",
16780
+ advanced: true
16781
+ },
16782
+ ...transferLimitFields("storage account")
16783
+ ]
16784
+ };
16785
+ });
16786
+
16297
16787
  // ../types/src/validation/workspace-schema.ts
16298
16788
  function validateWorkspaceSchema(content, _filename) {
16299
16789
  let json;
@@ -53805,7 +54295,7 @@ function describeUnsupportedType(nodeType) {
53805
54295
  function compileTypedScript(opts) {
53806
54296
  let ast;
53807
54297
  try {
53808
- ast = import_parser4.parse(opts.source, {
54298
+ ast = import_parser5.parse(opts.source, {
53809
54299
  sourceType: "script",
53810
54300
  plugins: ["typescript"],
53811
54301
  ranges: true
@@ -54058,9 +54548,9 @@ function stripCommentsAndStrings(s) {
54058
54548
  out = out.replace(/`(\\.|[^`\\])*`/g, "``");
54059
54549
  return out;
54060
54550
  }
54061
- var import_parser4, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
54551
+ var import_parser5, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
54062
54552
  var init_compile = __esm(() => {
54063
- import_parser4 = __toESM(require_lib(), 1);
54553
+ import_parser5 = __toESM(require_lib(), 1);
54064
54554
  import_sucrase = __toESM(require_dist3(), 1);
54065
54555
  EVALUATOR_PARAM_NAMES = ["expected", "actual"];
54066
54556
  });
@@ -54207,6 +54697,7 @@ var init_steps = __esm(() => {
54207
54697
  init_retry();
54208
54698
  AI_STEP_TYPES = [
54209
54699
  "ai.parse",
54700
+ "ai.parse-v2",
54210
54701
  "ai.extract",
54211
54702
  "ai.split",
54212
54703
  "ai.segment",
@@ -54381,6 +54872,7 @@ var init_step_configs = __esm(() => {
54381
54872
  init_email_servers();
54382
54873
  init_human_review();
54383
54874
  init_parser();
54875
+ init_document_parser_v2();
54384
54876
  init_json_to_xlsx();
54385
54877
  init_xlsx_to_json();
54386
54878
  init_typed_script();
@@ -55145,10 +55637,19 @@ var init_step_configs = __esm(() => {
55145
55637
  });
55146
55638
  ControlFailOutputSchema = never().describe("control.fail never produces output — it terminates the workflow when triggered.");
55147
55639
  STEP_SCHEMAS = {
55640
+ "ai.parse-v2": {
55641
+ type: "ai.parse-v2",
55642
+ category: "ai",
55643
+ name: "Parse Document",
55644
+ description: "Automatically read native, scanned, and mixed documents with capability-aware OCR/vision fallback and explicit completeness.",
55645
+ configSchema: AiParseV2ConfigSchema,
55646
+ outputSchema: ParseV2ResultSchema,
55647
+ configInWith: true
55648
+ },
55148
55649
  "ai.parse": {
55149
55650
  type: "ai.parse",
55150
55651
  category: "ai",
55151
- name: "Parse Document",
55652
+ name: "Parse Document — legacy",
55152
55653
  description: "Extract text from documents (PDF, DOCX, images) using native extraction, OCR, or vision models",
55153
55654
  configSchema: AiParseConfigSchema,
55154
55655
  outputSchema: AiParseOutputSchema,
@@ -55684,63 +56185,11 @@ var init_workflow2 = __esm(() => {
55684
56185
  init_workflow();
55685
56186
  });
55686
56187
 
55687
- // ../types/src/file-source/descriptor.ts
55688
- var GPFS_FILE_SOURCE_NAME = "gpfs", GPFS_FILE_SOURCE_DESCRIPTOR;
55689
- var init_descriptor = __esm(() => {
55690
- GPFS_FILE_SOURCE_DESCRIPTOR = {
55691
- name: GPFS_FILE_SOURCE_NAME,
55692
- label: "GPFS file registry",
55693
- description: "Fetch documents by id from a GPFS/GFR HTTP file registry.",
55694
- configFields: [
55695
- {
55696
- key: "baseUrl",
55697
- label: "Base URL",
55698
- type: "string",
55699
- required: true,
55700
- description: "Base URL of the registry. The file id is appended to fetch each file.",
55701
- placeholder: "https://files.example.com/registry"
55702
- },
55703
- {
55704
- key: "authToken",
55705
- label: "Bearer token",
55706
- type: "secret",
55707
- required: false,
55708
- description: "Bearer token for the registry, if it requires one."
55709
- },
55710
- {
55711
- key: "insecureSkipTlsVerify",
55712
- label: "Skip TLS verification",
55713
- type: "boolean",
55714
- required: false,
55715
- description: "Only for registries with self-signed or legacy certificates.",
55716
- default: false,
55717
- advanced: true
55718
- },
55719
- {
55720
- key: "timeoutMs",
55721
- label: "Timeout (ms)",
55722
- type: "number",
55723
- required: false,
55724
- description: "How long to wait for the registry before giving up.",
55725
- default: 30000,
55726
- advanced: true
55727
- },
55728
- {
55729
- key: "maxFileBytes",
55730
- label: "Max file size (bytes)",
55731
- type: "number",
55732
- required: false,
55733
- description: "Reject files larger than this.",
55734
- default: 50 * 1024 * 1024,
55735
- advanced: true
55736
- }
55737
- ]
55738
- };
55739
- });
55740
-
55741
56188
  // ../types/src/file-source/index.ts
55742
56189
  var init_file_source = __esm(() => {
55743
56190
  init_descriptor();
56191
+ init_reference();
56192
+ init_resolver();
55744
56193
  });
55745
56194
 
55746
56195
  // ../types/src/eval/compare-output.ts
@@ -56754,6 +57203,26 @@ var init_git_source = __esm(() => {
56754
57203
  // ../types/src/automation/triggers.ts
56755
57204
  var init_triggers = () => {};
56756
57205
 
57206
+ // ../types/src/webhook-delivery-settings.ts
57207
+ var WEBHOOK_REQUEST_TIMEOUT_MIN_MS = 1000, WEBHOOK_REQUEST_TIMEOUT_MAX_MS = 120000, WEBHOOK_RETRY_POLICIES, AllowPrivateDestinationsSchema, RequestTimeoutMsSchema, RetryPolicySchema, WebhookDeliverySettingsSchema, WebhookDeliverySettingsPatchSchema;
57208
+ var init_webhook_delivery_settings = __esm(() => {
57209
+ init_zod();
57210
+ WEBHOOK_RETRY_POLICIES = ["standard", "quick", "none"];
57211
+ AllowPrivateDestinationsSchema = boolean2();
57212
+ RequestTimeoutMsSchema = number2().int().min(WEBHOOK_REQUEST_TIMEOUT_MIN_MS).max(WEBHOOK_REQUEST_TIMEOUT_MAX_MS).multipleOf(1000);
57213
+ RetryPolicySchema = _enum(WEBHOOK_RETRY_POLICIES);
57214
+ WebhookDeliverySettingsSchema = object({
57215
+ allowPrivateDestinations: AllowPrivateDestinationsSchema.optional(),
57216
+ requestTimeoutMs: RequestTimeoutMsSchema.optional(),
57217
+ retryPolicy: RetryPolicySchema.optional()
57218
+ });
57219
+ WebhookDeliverySettingsPatchSchema = object({
57220
+ allowPrivateDestinations: AllowPrivateDestinationsSchema.nullable().optional(),
57221
+ requestTimeoutMs: RequestTimeoutMsSchema.nullable().optional(),
57222
+ retryPolicy: RetryPolicySchema.nullable().optional()
57223
+ }).strict();
57224
+ });
57225
+
56757
57226
  // ../types/src/webhooks.ts
56758
57227
  function validateWebhookHeaderCollection(input, ctx) {
56759
57228
  if (input.customHeaders) {
@@ -56976,6 +57445,8 @@ var init_src = __esm(() => {
56976
57445
  init_execution_row();
56977
57446
  init_run_expand();
56978
57447
  init_execution_tags();
57448
+ init_document_parser_v2();
57449
+ init_parse_v2_migration();
56979
57450
  init_validation();
56980
57451
  init_workflow2();
56981
57452
  init_file_source();
@@ -56983,8 +57454,10 @@ var init_src = __esm(() => {
56983
57454
  init_git_source();
56984
57455
  init_triggers();
56985
57456
  init_email_servers();
57457
+ init_webhook_delivery_settings();
56986
57458
  init_webhooks();
56987
57459
  init_typed_script();
57460
+ init_spreadsheet_evidence();
56988
57461
  });
56989
57462
 
56990
57463
  // node_modules/yaml/dist/nodes/identity.js
@@ -207035,7 +207508,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
207035
207508
  // package.json
207036
207509
  var package_default = {
207037
207510
  name: "@eigenpal/cli",
207038
- version: "0.20.27",
207511
+ version: "0.20.29",
207039
207512
  description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
207040
207513
  keywords: [
207041
207514
  "eigenpal",
@@ -243863,6 +244336,20 @@ var COLUMNS = [
243863
244336
  ];
243864
244337
  function registerModelsCommands(program) {
243865
244338
  const models = program.command("models").description("Inspect models and providers configured for the current tenant environment (text, vision, OCR).");
244339
+ addJsonFlag(withBaseUrl(models.command("parser-readiness").description("Inspect deployment-approved ai.parse-v2 defaults. Catalog state only; document smoke tests are required for live readiness."))).action(action(async (opts) => {
244340
+ const config = resolveConfig(opts);
244341
+ requireApiKey(config);
244342
+ const result = await new ApiClient(config).get("/api/v1/parsing/readiness");
244343
+ if (opts.json)
244344
+ console.log(JSON.stringify(result));
244345
+ else {
244346
+ console.log(`Image reading: ${result.imageReading}
244347
+ OCR: ${result.providers.ocr ?? "none"}
244348
+ Vision: ${result.providers.vision ?? "none"}`);
244349
+ for (const warning of result.warnings)
244350
+ console.error(warning);
244351
+ }
244352
+ }));
243866
244353
  addJsonFlag(withBaseUrl(models.command("list").description("List configured text, vision, and OCR models. This is a catalog inventory from the server, not a live provider health probe. `health` is `configured` or `unconfigured` from local credentials. Pair with `--json` for scripting.").option("--capability <kind>", "Filter to `text`, `vision`, or `ocr` (matches the API `capability` query).").addHelpText("after", `
243867
244354
  Health
243868
244355
  configured Credentials for this model are present in the environment.
@@ -247117,6 +247604,36 @@ async function deleteWorkflowFolder(pathOrId, opts) {
247117
247604
  success(`Deleted folder ${ui.bold(pathLabel)}`);
247118
247605
  }
247119
247606
 
247607
+ // src/commands/workflow/migrate-parser.ts
247608
+ init_src();
247609
+ import { readFile as readFile4, writeFile as writeFile3 } from "node:fs/promises";
247610
+ import { resolve as resolve9 } from "node:path";
247611
+ function registerParserMigrationCommand(workflow) {
247612
+ workflow.command("migrate-parser <file>").description("Write a reviewable ai.parse-v2 workflow migration to a new file. Never pushes or changes the source.").requiredOption("--policy <policy>", "preserve backend restrictions, or auto to adopt automatic native/OCR/vision parsing").requiredOption("--out <file>", "New YAML output file (must not already exist)").option("--json", "Emit migration summary as JSON").action(action(async (file, options) => {
247613
+ if (options.policy !== "preserve" && options.policy !== "auto")
247614
+ throw new Error("--policy must be preserve or auto");
247615
+ if (resolve9(file) === resolve9(options.out))
247616
+ throw new Error("Migration output must differ from the source");
247617
+ const source = $parse(await readFile4(file, "utf8"));
247618
+ if (!source || typeof source !== "object" || Array.isArray(source))
247619
+ throw new Error("Expected a workflow YAML object");
247620
+ const migration = migrateWorkflowParsers(source, options.policy);
247621
+ await writeFile3(options.out, $stringify(migration.definition), { flag: "wx" });
247622
+ const summary = {
247623
+ out: resolve9(options.out),
247624
+ migratedSteps: migration.migratedSteps,
247625
+ warnings: migration.warnings
247626
+ };
247627
+ if (options.json)
247628
+ console.log(JSON.stringify(summary));
247629
+ else {
247630
+ console.log(`Wrote ${summary.out}; migrated ${summary.migratedSteps.length} parser step(s). Review and test before publishing.`);
247631
+ for (const warning of summary.warnings)
247632
+ console.error(warning);
247633
+ }
247634
+ }));
247635
+ }
247636
+
247120
247637
  // src/commands/workflow/step-exec.ts
247121
247638
  init_src();
247122
247639
  var UNSUPPORTED_TYPE_EXIT = 2;
@@ -247146,7 +247663,7 @@ function registerStepExecCommands(workflow) {
247146
247663
  // src/commands/workflow/templates.ts
247147
247664
  init_src();
247148
247665
  import { existsSync as existsSync20, promises as fs20 } from "node:fs";
247149
- import { basename as basename4, resolve as resolve9 } from "node:path";
247666
+ import { basename as basename4, resolve as resolve10 } from "node:path";
247150
247667
  function buildClient5(opts) {
247151
247668
  const config = resolveConfig(opts);
247152
247669
  requireApiKey(config);
@@ -247158,11 +247675,11 @@ function printJson5(value) {
247158
247675
  async function readJsonFixtureFile(fixturePath) {
247159
247676
  let raw;
247160
247677
  try {
247161
- raw = await fs20.readFile(resolve9(fixturePath), "utf8");
247678
+ raw = await fs20.readFile(resolve10(fixturePath), "utf8");
247162
247679
  } catch (err) {
247163
247680
  const code = err && typeof err === "object" && "code" in err ? String(err.code) : "";
247164
247681
  if (code === "ENOENT") {
247165
- throw new Error(`JSON fixture file not found: ${resolve9(fixturePath)}`);
247682
+ throw new Error(`JSON fixture file not found: ${resolve10(fixturePath)}`);
247166
247683
  }
247167
247684
  throw err;
247168
247685
  }
@@ -247209,7 +247726,7 @@ function registerTemplateCommands(parent) {
247209
247726
  const templates = parent.command("templates").description("Manage workspace DOCX/XLSX templates (tmpl_…): upload, list, inspect, download, replace, delete, and smoke-fill.").addHelpText("after", TEMPLATES_EXAMPLES);
247210
247727
  const uploadCmd = templates.command("upload <file>").description("Upload a DOCX or XLSX file as a new tmpl_… resource with an immutable tmpr_… revision.").option("--name <name>", "Display name (defaults to the filename without extension)").option("--description <text>", "Optional description");
247211
247728
  addJsonFlag(withBaseUrl(uploadCmd)).action(action(async (file, opts) => {
247212
- const filePath = resolve9(file);
247729
+ const filePath = resolve10(file);
247213
247730
  const bytes = await fs20.readFile(filePath);
247214
247731
  const client = buildClient5(opts);
247215
247732
  const template = await uploadWorkspaceTemplate(client, {
@@ -247274,7 +247791,7 @@ function registerTemplateCommands(parent) {
247274
247791
  }));
247275
247792
  const replaceCmd = templates.command("replace <template-id> <file>").description("Append an immutable revision and advance the tmpl_… pointer.");
247276
247793
  addJsonFlag(withBaseUrl(replaceCmd)).action(action(async (templateId, file, opts) => {
247277
- const filePath = resolve9(file);
247794
+ const filePath = resolve10(file);
247278
247795
  const bytes = await fs20.readFile(filePath);
247279
247796
  const client = buildClient5(opts);
247280
247797
  const current = await getPublicTemplate(client, templateId);
@@ -247325,7 +247842,7 @@ function registerTemplateCommands(parent) {
247325
247842
  bytes = downloaded.bytes;
247326
247843
  filename = downloaded.filename;
247327
247844
  } else {
247328
- const filePath = resolve9(templateArg);
247845
+ const filePath = resolve10(templateArg);
247329
247846
  if (!existsSync20(filePath)) {
247330
247847
  throw new Error(`Template file not found: ${filePath}. Pass a local .docx/.xlsx path or a tmpl_… id.`);
247331
247848
  }
@@ -247369,7 +247886,7 @@ function registerTemplateCommands(parent) {
247369
247886
  // src/commands/workflow/validation.ts
247370
247887
  init_src();
247371
247888
  import { existsSync as existsSync22, readdirSync as readdirSync7, readFileSync as readFileSync19, statSync as statSync7 } from "fs";
247372
- import { join as join13, resolve as resolve10 } from "path";
247889
+ import { join as join13, resolve as resolve11 } from "path";
247373
247890
 
247374
247891
  // src/lib/template-diagnostics.ts
247375
247892
  init_src();
@@ -247986,7 +248503,7 @@ function parseDatasetFileRef(path, root) {
247986
248503
  return parts.join("/");
247987
248504
  }
247988
248505
  function rootDir(opts) {
247989
- return resolve10(opts.dir ?? process.cwd());
248506
+ return resolve11(opts.dir ?? process.cwd());
247990
248507
  }
247991
248508
  async function onlineInvokeIssues(yamlText, opts) {
247992
248509
  const config = resolveConfig(opts);
@@ -247996,7 +248513,7 @@ async function onlineInvokeIssues(yamlText, opts) {
247996
248513
  return res.issues ?? [];
247997
248514
  }
247998
248515
  function discoverWorkflowProjectRoots(rootPath) {
247999
- const root = resolve10(rootPath);
248516
+ const root = resolve11(rootPath);
248000
248517
  if (existsSync22(join13(root, "workflow.yaml")))
248001
248518
  return [root];
248002
248519
  const candidates = [
@@ -248043,8 +248560,8 @@ Note
248043
248560
  ` + ` project unless you pass --allow-external-templates.
248044
248561
  `);
248045
248562
  withBaseUrl(cmd).action(action(async (path, opts) => {
248046
- if (path && (!existsSync22(resolve10(path)) || !statSync7(resolve10(path)).isDirectory())) {
248047
- const target = resolve10(path);
248563
+ if (path && (!existsSync22(resolve11(path)) || !statSync7(resolve11(path)).isDirectory())) {
248564
+ const target = resolve11(path);
248048
248565
  const wfResult = validateWorkflowYaml(target);
248049
248566
  const wfOk = printIssues("workflow.yaml", target, wfResult.issues);
248050
248567
  if (wfOk) {
@@ -248060,7 +248577,7 @@ Note
248060
248577
  process.exit(1);
248061
248578
  return;
248062
248579
  }
248063
- const requestedRoot = path ? resolve10(path) : rootDir(opts);
248580
+ const requestedRoot = path ? resolve11(path) : rootDir(opts);
248064
248581
  const projects = discoverWorkflowProjectRoots(requestedRoot);
248065
248582
  if (projects.length === 0) {
248066
248583
  if (!await validateProjectRoot(requestedRoot, opts))
@@ -248082,14 +248599,14 @@ Note
248082
248599
  }
248083
248600
  function registerEvaluatorsValidateCommand(parent) {
248084
248601
  parent.command("validate [path]").description("Validate an evaluators YAML file against the EvalConfig schema. Defaults to ./evaluators.yaml.").action((path) => {
248085
- const target = resolve10(path ?? "evaluators.yaml");
248602
+ const target = resolve11(path ?? "evaluators.yaml");
248086
248603
  if (!printIssues("evaluators", target, validateEvaluatorsYaml(target)))
248087
248604
  process.exit(1);
248088
248605
  });
248089
248606
  }
248090
248607
  function registerDatasetValidateCommand(parent) {
248091
248608
  parent.command("validate [path]").description("Validate a dataset folder against the examples/<name>/{input,expected,meta} convention. Defaults to ./dataset/.").action((path) => {
248092
- const target = resolve10(path ?? "dataset");
248609
+ const target = resolve11(path ?? "dataset");
248093
248610
  if (!printIssues("dataset", target, validateDatasetFolder(target)))
248094
248611
  process.exit(1);
248095
248612
  });
@@ -248203,6 +248720,7 @@ YAML's \`name:\` field). Both:
248203
248720
  $ eigenpal workflow pull my-extraction
248204
248721
  `);
248205
248722
  registerWorkflowCoreCommands(workflow);
248723
+ registerParserMigrationCommand(workflow);
248206
248724
  registerWorkflowFolderCommands(workflow);
248207
248725
  registerEvaluatorsCommands(workflow);
248208
248726
  registerDatasetCommands2(workflow);