@eigenpal/cli 0.20.40 → 0.20.41

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
@@ -8479,7 +8479,8 @@ var init_ids = __esm(() => {
8479
8479
  XLSX_TO_JSON: "builtin/xlsx-to-json",
8480
8480
  JSON_TO_XLSX: "builtin/json-to-xlsx",
8481
8481
  ARCHIVE_LIST: "builtin/archive-list",
8482
- ARCHIVE_EXTRACT: "builtin/archive-extract"
8482
+ ARCHIVE_EXTRACT: "builtin/archive-extract",
8483
+ MERGE_DOCUMENTS: "builtin/merge-documents"
8483
8484
  };
8484
8485
  });
8485
8486
 
@@ -54722,7 +54723,8 @@ var init_steps = __esm(() => {
54722
54723
  "transform.text-chunker",
54723
54724
  "transform.regex-extract",
54724
54725
  "transform.archive-list",
54725
- "transform.archive-extract"
54726
+ "transform.archive-extract",
54727
+ "transform.merge-documents"
54726
54728
  ];
54727
54729
  ACTION_STEP_TYPES = [
54728
54730
  "action.http",
@@ -54864,7 +54866,7 @@ function getStepSchema(stepType) {
54864
54866
  function listStepTypes() {
54865
54867
  return [...STEP_TYPES];
54866
54868
  }
54867
- 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;
54869
+ 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, TransformMergeDocumentsConfigSchema, TransformMergeDocumentsSourceSchema, TransformMergeDocumentsOutputSchema, 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;
54868
54870
  var init_step_configs = __esm(() => {
54869
54871
  init_zod();
54870
54872
  init_ai_client();
@@ -55346,6 +55348,26 @@ var init_step_configs = __esm(() => {
55346
55348
  mimeType: string2().describe("Detected MIME type of the extracted file"),
55347
55349
  size: number2().int().min(0).describe("Uncompressed size in bytes")
55348
55350
  });
55351
+ TransformMergeDocumentsConfigSchema = object({
55352
+ files: string2().min(1).describe("Template expression resolving to the files to merge, in order: a file list input such as {{ input.documents }}, or a single file. PDF, images (JPEG, PNG, TIFF, WebP, GIF) and Word, PowerPoint, OpenDocument or RTF documents."),
55353
+ filename: string2().optional().describe("Filename of the merged PDF. Defaults to merged.pdf; .pdf is appended when missing.")
55354
+ });
55355
+ TransformMergeDocumentsSourceSchema = object({
55356
+ filename: string2().describe("Filename of the source file"),
55357
+ mimeType: string2().describe("MIME type of the source file"),
55358
+ pageCount: number2().int().min(0).describe("Pages this source contributed"),
55359
+ pageRange: tuple([number2().int(), number2().int()]).describe("[startIndex, endIndex] inclusive, 0-based page indices in the merged PDF")
55360
+ });
55361
+ TransformMergeDocumentsOutputSchema = object({
55362
+ file: object({
55363
+ fileId: string2().describe("File ID of the merged PDF"),
55364
+ filename: string2().describe("Filename of the merged PDF"),
55365
+ mimeType: string2().describe("Always application/pdf"),
55366
+ size: number2().int().min(0).describe("Size of the merged PDF in bytes")
55367
+ }).describe("The merged PDF. Pass {{ steps.<step>.output.file }} to Parse, Vision or any other file input."),
55368
+ pageCount: number2().int().min(0).describe("Total pages in the merged PDF"),
55369
+ sources: array(TransformMergeDocumentsSourceSchema).describe("One entry per input file, in merge order, with the merged page range it occupies. Use it to map a merged page index back to its source file.")
55370
+ });
55349
55371
  TransformScriptConfigSchema = object({
55350
55372
  inputs: record(string2(), string2()).optional().describe("Named inputs mapped from template expressions. Keys become function parameters; parameter order is independent of YAML/JSON key order: `inputs: { items, taxRate }` accepts `function script(taxRate: …, items: …): R { … }`."),
55351
55373
  function: string2().min(1).max(SCRIPT_FN_MAX_BYTES, `script function is too long (max ${(SCRIPT_FN_MAX_BYTES / 1000).toFixed(0)}k characters)`).describe("TypeScript function declaration. Must be `function script(args): R { … }` where parameter names exactly match the configured input keys in any order and `R` is a return type annotation. The annotation IS this step's output schema."),
@@ -55649,8 +55671,8 @@ var init_step_configs = __esm(() => {
55649
55671
  "ai.parse": {
55650
55672
  type: "ai.parse",
55651
55673
  category: "ai",
55652
- name: "Parse Document — legacy",
55653
- description: "Extract text from documents (PDF, DOCX, images) using native extraction, OCR, or vision models",
55674
+ name: "Parse Document v1",
55675
+ description: "Parse Document v1, the retired parser, kept only so existing workflows run unchanged. Do not add it to workflows: use ai.parse-v2 (Parse Document), which picks native text, OCR or vision per page.",
55654
55676
  configSchema: AiParseConfigSchema,
55655
55677
  outputSchema: AiParseOutputSchema,
55656
55678
  configInWith: true
@@ -55862,6 +55884,15 @@ var init_step_configs = __esm(() => {
55862
55884
  outputSchema: TransformArchiveExtractOutputSchema,
55863
55885
  configInWith: true
55864
55886
  },
55887
+ "transform.merge-documents": {
55888
+ type: "transform.merge-documents",
55889
+ category: "transform",
55890
+ name: "Merge Documents",
55891
+ description: "Concatenate several files into one PDF run output, in order. Accepts PDFs, images (multi-page TIFF included) and Word, PowerPoint, OpenDocument or RTF documents. Use it when one logical document arrives as several uploads: pass {{ steps.merge.output.file }} into Parse so page labels, page ranges and vision page indices stay continuous across every source. Output sources[] maps each input file to its merged page range.",
55892
+ configSchema: TransformMergeDocumentsConfigSchema,
55893
+ outputSchema: TransformMergeDocumentsOutputSchema,
55894
+ configInWith: true
55895
+ },
55865
55896
  "action.http": {
55866
55897
  type: "action.http",
55867
55898
  category: "action",
@@ -207478,6 +207509,72 @@ __exportCjs(exports_commander, {
207478
207509
  InvalidArgumentError: (value) => $InvalidArgumentError = value,
207479
207510
  InvalidOptionArgumentError: (value) => $InvalidOptionArgumentError = value
207480
207511
  });
207512
+
207513
+ // node_modules/yaml/dist/index.js
207514
+ var exports_dist = {};
207515
+ __exportCjs(exports_dist, {
207516
+ Composer: () => $Composer,
207517
+ Document: () => $Document,
207518
+ Schema: () => $Schema,
207519
+ YAMLError: () => $YAMLError,
207520
+ YAMLParseError: () => $YAMLParseError,
207521
+ YAMLWarning: () => $YAMLWarning,
207522
+ Alias: () => $Alias,
207523
+ isAlias: () => $isAlias,
207524
+ isCollection: () => $isCollection,
207525
+ isDocument: () => $isDocument,
207526
+ isMap: () => $isMap,
207527
+ isNode: () => $isNode,
207528
+ isPair: () => $isPair,
207529
+ isScalar: () => $isScalar,
207530
+ isSeq: () => $isSeq,
207531
+ Pair: () => $Pair,
207532
+ Scalar: () => $Scalar,
207533
+ YAMLMap: () => $YAMLMap,
207534
+ YAMLSeq: () => $YAMLSeq,
207535
+ CST: () => $CST,
207536
+ Lexer: () => $Lexer,
207537
+ LineCounter: () => $LineCounter,
207538
+ Parser: () => $Parser,
207539
+ parse: () => $parse,
207540
+ parseAllDocuments: () => $parseAllDocuments,
207541
+ parseDocument: () => $parseDocument,
207542
+ stringify: () => $stringify,
207543
+ visit: () => $visit,
207544
+ visitAsync: () => $visitAsync
207545
+ }, {
207546
+ Composer: (value2) => $Composer = value2,
207547
+ Document: (value2) => $Document = value2,
207548
+ Schema: (value2) => $Schema = value2,
207549
+ YAMLError: (value2) => $YAMLError = value2,
207550
+ YAMLParseError: (value2) => $YAMLParseError = value2,
207551
+ YAMLWarning: (value2) => $YAMLWarning = value2,
207552
+ Alias: (value2) => $Alias = value2,
207553
+ isAlias: (value2) => $isAlias = value2,
207554
+ isCollection: (value2) => $isCollection = value2,
207555
+ isDocument: (value2) => $isDocument = value2,
207556
+ isMap: (value2) => $isMap = value2,
207557
+ isNode: (value2) => $isNode = value2,
207558
+ isPair: (value2) => $isPair = value2,
207559
+ isScalar: (value2) => $isScalar = value2,
207560
+ isSeq: (value2) => $isSeq = value2,
207561
+ Pair: (value2) => $Pair = value2,
207562
+ Scalar: (value2) => $Scalar = value2,
207563
+ YAMLMap: (value2) => $YAMLMap = value2,
207564
+ YAMLSeq: (value2) => $YAMLSeq = value2,
207565
+ CST: (value2) => $CST = value2,
207566
+ Lexer: (value2) => $Lexer = value2,
207567
+ LineCounter: (value2) => $LineCounter = value2,
207568
+ Parser: (value2) => $Parser = value2,
207569
+ parse: (value2) => $parse = value2,
207570
+ parseAllDocuments: (value2) => $parseAllDocuments = value2,
207571
+ parseDocument: (value2) => $parseDocument = value2,
207572
+ stringify: (value2) => $stringify = value2,
207573
+ visit: (value2) => $visit = value2,
207574
+ visitAsync: (value2) => $visitAsync = value2
207575
+ });
207576
+
207577
+ // ../../node_modules/commander/index.js
207481
207578
  var { Argument } = require_argument();
207482
207579
  var { Command } = require_command();
207483
207580
  var { CommanderError, InvalidArgumentError } = require_error();
@@ -207572,7 +207669,7 @@ function resolveRequestUrl(baseUrl, path) {
207572
207669
  // package.json
207573
207670
  var package_default = {
207574
207671
  name: "@eigenpal/cli",
207575
- version: "0.20.40",
207672
+ version: "0.20.41",
207576
207673
  description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
207577
207674
  keywords: [
207578
207675
  "eigenpal",
@@ -207622,7 +207719,7 @@ var package_default = {
207622
207719
  "generate:cli-docs:check": "bun scripts/generate-cli-docs.ts --check",
207623
207720
  "generate:logo": "bun scripts/render-logo-ascii.ts --cells 20",
207624
207721
  test: "bun test src/ scripts/",
207625
- typecheck: "tsc --noEmit"
207722
+ typecheck: "bun check"
207626
207723
  },
207627
207724
  dependencies: {
207628
207725
  "@clack/prompts": "^1.3.0",
@@ -208413,68 +208510,6 @@ import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as rea
208413
208510
  import path2 from "node:path";
208414
208511
 
208415
208512
  // node_modules/yaml/dist/index.js
208416
- var exports_dist = {};
208417
- __exportCjs(exports_dist, {
208418
- Composer: () => $Composer,
208419
- Document: () => $Document,
208420
- Schema: () => $Schema,
208421
- YAMLError: () => $YAMLError,
208422
- YAMLParseError: () => $YAMLParseError,
208423
- YAMLWarning: () => $YAMLWarning,
208424
- Alias: () => $Alias,
208425
- isAlias: () => $isAlias,
208426
- isCollection: () => $isCollection,
208427
- isDocument: () => $isDocument,
208428
- isMap: () => $isMap,
208429
- isNode: () => $isNode,
208430
- isPair: () => $isPair,
208431
- isScalar: () => $isScalar,
208432
- isSeq: () => $isSeq,
208433
- Pair: () => $Pair,
208434
- Scalar: () => $Scalar,
208435
- YAMLMap: () => $YAMLMap,
208436
- YAMLSeq: () => $YAMLSeq,
208437
- CST: () => $CST,
208438
- Lexer: () => $Lexer,
208439
- LineCounter: () => $LineCounter,
208440
- Parser: () => $Parser,
208441
- parse: () => $parse,
208442
- parseAllDocuments: () => $parseAllDocuments,
208443
- parseDocument: () => $parseDocument,
208444
- stringify: () => $stringify,
208445
- visit: () => $visit,
208446
- visitAsync: () => $visitAsync
208447
- }, {
208448
- Composer: (value2) => $Composer = value2,
208449
- Document: (value2) => $Document = value2,
208450
- Schema: (value2) => $Schema = value2,
208451
- YAMLError: (value2) => $YAMLError = value2,
208452
- YAMLParseError: (value2) => $YAMLParseError = value2,
208453
- YAMLWarning: (value2) => $YAMLWarning = value2,
208454
- Alias: (value2) => $Alias = value2,
208455
- isAlias: (value2) => $isAlias = value2,
208456
- isCollection: (value2) => $isCollection = value2,
208457
- isDocument: (value2) => $isDocument = value2,
208458
- isMap: (value2) => $isMap = value2,
208459
- isNode: (value2) => $isNode = value2,
208460
- isPair: (value2) => $isPair = value2,
208461
- isScalar: (value2) => $isScalar = value2,
208462
- isSeq: (value2) => $isSeq = value2,
208463
- Pair: (value2) => $Pair = value2,
208464
- Scalar: (value2) => $Scalar = value2,
208465
- YAMLMap: (value2) => $YAMLMap = value2,
208466
- YAMLSeq: (value2) => $YAMLSeq = value2,
208467
- CST: (value2) => $CST = value2,
208468
- Lexer: (value2) => $Lexer = value2,
208469
- LineCounter: (value2) => $LineCounter = value2,
208470
- Parser: (value2) => $Parser = value2,
208471
- parse: (value2) => $parse = value2,
208472
- parseAllDocuments: (value2) => $parseAllDocuments = value2,
208473
- parseDocument: (value2) => $parseDocument = value2,
208474
- stringify: (value2) => $stringify = value2,
208475
- visit: (value2) => $visit = value2,
208476
- visitAsync: (value2) => $visitAsync = value2
208477
- });
208478
208513
  var composer = require_composer();
208479
208514
  var Document = require_Document();
208480
208515
  var Schema = require_Schema();