@eigenpal/cli 0.10.56 → 0.11.1

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
@@ -17502,6 +17502,45 @@ var init_scoped_file_ref = __esm(() => {
17502
17502
  ]);
17503
17503
  });
17504
17504
 
17505
+ // ../types/src/files/upload-session.ts
17506
+ function isRunInputFilePurpose(purpose) {
17507
+ return purpose === FILE_PURPOSE_RUN_INPUT;
17508
+ }
17509
+ function isBuilderAttachmentFilePurpose(purpose) {
17510
+ return purpose === FILE_PURPOSE_BUILDER_ATTACHMENT;
17511
+ }
17512
+ function isEphemeralPoolFilePurpose(purpose) {
17513
+ return isRunInputFilePurpose(purpose) || isBuilderAttachmentFilePurpose(purpose);
17514
+ }
17515
+ function isFileUploadTerminalStatus(status) {
17516
+ return FILE_UPLOAD_TERMINAL_STATUSES.includes(status);
17517
+ }
17518
+ function isFileUploadProtectedStatus(status) {
17519
+ return FILE_UPLOAD_PROTECTED_STATUSES.includes(status);
17520
+ }
17521
+ function pendingFileUploadKey(uploadId) {
17522
+ return `file-uploads/${uploadId}`;
17523
+ }
17524
+ var FILE_UPLOAD_PURPOSES, FileUploadPurposeSchema, FILE_PURPOSE_RUN_INPUT = "run-input", FILE_PURPOSE_BUILDER_ATTACHMENT = "builder-attachment", FILE_UPLOAD_STATUSES, FileUploadStatusSchema, FILE_UPLOAD_TERMINAL_STATUSES, FILE_UPLOAD_PROTECTED_STATUSES, FILE_UPLOAD_TRANSPORTS, FileUploadTransportSchema;
17525
+ var init_upload_session = __esm(() => {
17526
+ init_zod();
17527
+ FILE_UPLOAD_PURPOSES = ["run-input", "builder-attachment"];
17528
+ FileUploadPurposeSchema = exports_external.enum(FILE_UPLOAD_PURPOSES);
17529
+ FILE_UPLOAD_STATUSES = [
17530
+ "pending",
17531
+ "promoting",
17532
+ "recovering",
17533
+ "completed",
17534
+ "aborted",
17535
+ "expired"
17536
+ ];
17537
+ FileUploadStatusSchema = exports_external.enum(FILE_UPLOAD_STATUSES);
17538
+ FILE_UPLOAD_TERMINAL_STATUSES = ["completed", "aborted", "expired"];
17539
+ FILE_UPLOAD_PROTECTED_STATUSES = ["pending", "promoting", "recovering"];
17540
+ FILE_UPLOAD_TRANSPORTS = ["presigned-put", "multipart"];
17541
+ FileUploadTransportSchema = exports_external.enum(FILE_UPLOAD_TRANSPORTS);
17542
+ });
17543
+
17505
17544
  // ../types/src/processor/index.ts
17506
17545
  var init_processor = () => {};
17507
17546
 
@@ -17830,7 +17869,13 @@ var init_run_expand = __esm(() => {
17830
17869
  });
17831
17870
 
17832
17871
  // ../types/src/llm-determinism.ts
17833
- var DETERMINISTIC_TEMPERATURE = 0;
17872
+ function isTemperatureRejectionMessage(message) {
17873
+ return message.split(/[.;\n]/).some((clause) => /temperature/i.test(clause) && TEMPERATURE_REJECTION_MARKER.test(clause));
17874
+ }
17875
+ var DETERMINISTIC_TEMPERATURE = 0, TEMPERATURE_REJECTION_MARKER;
17876
+ var init_llm_determinism = __esm(() => {
17877
+ TEMPERATURE_REJECTION_MARKER = /unsupported|not\s+support|n['’]?t\s+support|only\s+the\s+default|only\s+temperature/i;
17878
+ });
17834
17879
 
17835
17880
  // ../../node_modules/ajv/dist/compile/codegen/code.js
17836
17881
  var require_code = __commonJS((exports) => {
@@ -64707,6 +64752,7 @@ var init_dataset_archive = __esm(() => {
64707
64752
  });
64708
64753
  ERROR_HINTS = {
64709
64754
  "dataset-too-large": "Datasets are capped at 500 MB. Split into multiple Append imports.",
64755
+ "artifacts-zip-too-large": "Download artifacts individually via GET /runs/{id}/artifacts/{path}, or select a smaller files= subset.",
64710
64756
  "execution-in-flight": "Wait for the in-flight execution to complete, or cancel it from the Experiments tab.",
64711
64757
  "download-token-expired": "Re-request the resource to mint a new URL.",
64712
64758
  "legacy-dataset-format": "Re-export the dataset using the canonical automation convention (examples/<name>/input.json + input/<file> refs + expected.json)."
@@ -67151,6 +67197,7 @@ __export(exports_src, {
67151
67197
  redactFileSourceSecrets: () => redactFileSourceSecrets,
67152
67198
  publicExecutionFailure: () => publicExecutionFailure,
67153
67199
  projectAgentInputFiles: () => projectAgentInputFiles,
67200
+ pendingFileUploadKey: () => pendingFileUploadKey,
67154
67201
  pathToDottedPackageName: () => pathToDottedPackageName,
67155
67202
  parseWorkflowRerunVersion: () => parseWorkflowRerunVersion,
67156
67203
  parseStepType: () => parseStepType,
@@ -67178,10 +67225,12 @@ __export(exports_src, {
67178
67225
  isWorkflowResult: () => isWorkflowResult,
67179
67226
  isWorkflowIdRef: () => isWorkflowIdRef,
67180
67227
  isTerminalExecutionStatus: () => isTerminalExecutionStatus,
67228
+ isTemperatureRejectionMessage: () => isTemperatureRejectionMessage,
67181
67229
  isStepCategory: () => isStepCategory,
67182
67230
  isScopedFileRef: () => isScopedFileRef,
67183
67231
  isSchemaFile: () => isSchemaFile,
67184
67232
  isRuntimeFileRef: () => isRuntimeFileRef,
67233
+ isRunInputFilePurpose: () => isRunInputFilePurpose,
67185
67234
  isRunInSampleRank: () => isRunInSampleRank,
67186
67235
  isRunExpandSection: () => isRunExpandSection,
67187
67236
  isResolvedProcessorFile: () => isResolvedProcessorFile,
@@ -67190,11 +67239,15 @@ __export(exports_src, {
67190
67239
  isManualTriggerEnabled: () => isManualTriggerEnabled,
67191
67240
  isLocalAgentResourcePath: () => isLocalAgentResourcePath,
67192
67241
  isInlineFileIngressRef: () => isInlineFileIngressRef,
67242
+ isFileUploadTerminalStatus: () => isFileUploadTerminalStatus,
67243
+ isFileUploadProtectedStatus: () => isFileUploadProtectedStatus,
67193
67244
  isFileReferenceSentinel: () => isFileReferenceSentinel,
67194
67245
  isFilePathDescriptor: () => isFilePathDescriptor,
67195
67246
  isFileOutput: () => isFileOutput,
67196
67247
  isFileIngressRef: () => isFileIngressRef,
67197
67248
  isFileIdIngressRef: () => isFileIdIngressRef,
67249
+ isEphemeralPoolFilePurpose: () => isEphemeralPoolFilePurpose,
67250
+ isBuilderAttachmentFilePurpose: () => isBuilderAttachmentFilePurpose,
67198
67251
  isAutomationTriggerEnabled: () => isAutomationTriggerEnabled,
67199
67252
  isAgentEmailExplicitlyDisabled: () => isAgentEmailExplicitlyDisabled,
67200
67253
  inputsWithSource: () => inputsWithSource,
@@ -67477,11 +67530,21 @@ __export(exports_src, {
67477
67530
  GPFS_FILE_SOURCE_NAME: () => GPFS_FILE_SOURCE_NAME,
67478
67531
  GPFS_FILE_SOURCE_DESCRIPTOR: () => GPFS_FILE_SOURCE_DESCRIPTOR,
67479
67532
  ForeachStepSchema: () => ForeachStepSchema,
67533
+ FileUploadTransportSchema: () => FileUploadTransportSchema,
67534
+ FileUploadStatusSchema: () => FileUploadStatusSchema,
67535
+ FileUploadPurposeSchema: () => FileUploadPurposeSchema,
67480
67536
  FileReferenceSentinelSchema: () => FileReferenceSentinelSchema,
67481
67537
  FilePathDescriptorSchema: () => FilePathDescriptorSchema2,
67482
67538
  FileIngressRefSchema: () => FileIngressRefSchema,
67483
67539
  FileIdIngressRefSchema: () => FileIdIngressRefSchema,
67484
67540
  FailStepSchema: () => FailStepSchema,
67541
+ FILE_UPLOAD_TRANSPORTS: () => FILE_UPLOAD_TRANSPORTS,
67542
+ FILE_UPLOAD_TERMINAL_STATUSES: () => FILE_UPLOAD_TERMINAL_STATUSES,
67543
+ FILE_UPLOAD_STATUSES: () => FILE_UPLOAD_STATUSES,
67544
+ FILE_UPLOAD_PURPOSES: () => FILE_UPLOAD_PURPOSES,
67545
+ FILE_UPLOAD_PROTECTED_STATUSES: () => FILE_UPLOAD_PROTECTED_STATUSES,
67546
+ FILE_PURPOSE_RUN_INPUT: () => FILE_PURPOSE_RUN_INPUT,
67547
+ FILE_PURPOSE_BUILDER_ATTACHMENT: () => FILE_PURPOSE_BUILDER_ATTACHMENT,
67485
67548
  ExtractedTableSchema: () => ExtractedTableSchema,
67486
67549
  ExtractOutputSchema: () => ExtractOutputSchema,
67487
67550
  ExtractInputSchema: () => ExtractInputSchema,
@@ -67606,11 +67669,13 @@ var init_src = __esm(() => {
67606
67669
  init_legacy_boundary();
67607
67670
  init_runtime_file_ref();
67608
67671
  init_scoped_file_ref();
67672
+ init_upload_session();
67609
67673
  init_processor();
67610
67674
  init_parser();
67611
67675
  init_otel();
67612
67676
  init_execution_row();
67613
67677
  init_run_expand();
67678
+ init_llm_determinism();
67614
67679
  init_sample_rank();
67615
67680
  init_s3_paths();
67616
67681
  init_validation();
@@ -67623,7 +67688,7 @@ var init_src = __esm(() => {
67623
67688
  init_typed_script();
67624
67689
  });
67625
67690
 
67626
- // ../../node_modules/yaml/dist/nodes/identity.js
67691
+ // node_modules/yaml/dist/nodes/identity.js
67627
67692
  var require_identity = __commonJS((exports) => {
67628
67693
  var ALIAS = Symbol.for("yaml.alias");
67629
67694
  var DOC = Symbol.for("yaml.document");
@@ -67677,7 +67742,7 @@ var require_identity = __commonJS((exports) => {
67677
67742
  exports.isSeq = isSeq;
67678
67743
  });
67679
67744
 
67680
- // ../../node_modules/yaml/dist/visit.js
67745
+ // node_modules/yaml/dist/visit.js
67681
67746
  var require_visit = __commonJS((exports) => {
67682
67747
  var identity = require_identity();
67683
67748
  var BREAK = Symbol("break visit");
@@ -67832,7 +67897,7 @@ var require_visit = __commonJS((exports) => {
67832
67897
  exports.visitAsync = visitAsync;
67833
67898
  });
67834
67899
 
67835
- // ../../node_modules/yaml/dist/doc/directives.js
67900
+ // node_modules/yaml/dist/doc/directives.js
67836
67901
  var require_directives = __commonJS((exports) => {
67837
67902
  var identity = require_identity();
67838
67903
  var visit = require_visit();
@@ -67984,7 +68049,7 @@ var require_directives = __commonJS((exports) => {
67984
68049
  exports.Directives = Directives;
67985
68050
  });
67986
68051
 
67987
- // ../../node_modules/yaml/dist/doc/anchors.js
68052
+ // node_modules/yaml/dist/doc/anchors.js
67988
68053
  var require_anchors = __commonJS((exports) => {
67989
68054
  var identity = require_identity();
67990
68055
  var visit = require_visit();
@@ -68046,7 +68111,7 @@ var require_anchors = __commonJS((exports) => {
68046
68111
  exports.findNewAnchor = findNewAnchor;
68047
68112
  });
68048
68113
 
68049
- // ../../node_modules/yaml/dist/doc/applyReviver.js
68114
+ // node_modules/yaml/dist/doc/applyReviver.js
68050
68115
  var require_applyReviver = __commonJS((exports) => {
68051
68116
  function applyReviver(reviver, obj, key, val) {
68052
68117
  if (val && typeof val === "object") {
@@ -68093,7 +68158,7 @@ var require_applyReviver = __commonJS((exports) => {
68093
68158
  exports.applyReviver = applyReviver;
68094
68159
  });
68095
68160
 
68096
- // ../../node_modules/yaml/dist/nodes/toJS.js
68161
+ // node_modules/yaml/dist/nodes/toJS.js
68097
68162
  var require_toJS = __commonJS((exports) => {
68098
68163
  var identity = require_identity();
68099
68164
  function toJS(value, arg, ctx) {
@@ -68120,7 +68185,7 @@ var require_toJS = __commonJS((exports) => {
68120
68185
  exports.toJS = toJS;
68121
68186
  });
68122
68187
 
68123
- // ../../node_modules/yaml/dist/nodes/Node.js
68188
+ // node_modules/yaml/dist/nodes/Node.js
68124
68189
  var require_Node = __commonJS((exports) => {
68125
68190
  var applyReviver = require_applyReviver();
68126
68191
  var identity = require_identity();
@@ -68157,7 +68222,7 @@ var require_Node = __commonJS((exports) => {
68157
68222
  exports.NodeBase = NodeBase;
68158
68223
  });
68159
68224
 
68160
- // ../../node_modules/yaml/dist/nodes/Alias.js
68225
+ // node_modules/yaml/dist/nodes/Alias.js
68161
68226
  var require_Alias = __commonJS((exports) => {
68162
68227
  var anchors = require_anchors();
68163
68228
  var visit = require_visit();
@@ -68267,7 +68332,7 @@ var require_Alias = __commonJS((exports) => {
68267
68332
  exports.Alias = Alias;
68268
68333
  });
68269
68334
 
68270
- // ../../node_modules/yaml/dist/nodes/Scalar.js
68335
+ // node_modules/yaml/dist/nodes/Scalar.js
68271
68336
  var require_Scalar = __commonJS((exports) => {
68272
68337
  var identity = require_identity();
68273
68338
  var Node = require_Node();
@@ -68295,7 +68360,7 @@ var require_Scalar = __commonJS((exports) => {
68295
68360
  exports.isScalarValue = isScalarValue;
68296
68361
  });
68297
68362
 
68298
- // ../../node_modules/yaml/dist/doc/createNode.js
68363
+ // node_modules/yaml/dist/doc/createNode.js
68299
68364
  var require_createNode = __commonJS((exports) => {
68300
68365
  var Alias = require_Alias();
68301
68366
  var identity = require_identity();
@@ -68367,7 +68432,7 @@ var require_createNode = __commonJS((exports) => {
68367
68432
  exports.createNode = createNode;
68368
68433
  });
68369
68434
 
68370
- // ../../node_modules/yaml/dist/nodes/Collection.js
68435
+ // node_modules/yaml/dist/nodes/Collection.js
68371
68436
  var require_Collection = __commonJS((exports) => {
68372
68437
  var createNode = require_createNode();
68373
68438
  var identity = require_identity();
@@ -68482,7 +68547,7 @@ var require_Collection = __commonJS((exports) => {
68482
68547
  exports.isEmptyPath = isEmptyPath;
68483
68548
  });
68484
68549
 
68485
- // ../../node_modules/yaml/dist/stringify/stringifyComment.js
68550
+ // node_modules/yaml/dist/stringify/stringifyComment.js
68486
68551
  var require_stringifyComment = __commonJS((exports) => {
68487
68552
  var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
68488
68553
  function indentComment(comment, indent) {
@@ -68499,7 +68564,7 @@ var require_stringifyComment = __commonJS((exports) => {
68499
68564
  exports.stringifyComment = stringifyComment;
68500
68565
  });
68501
68566
 
68502
- // ../../node_modules/yaml/dist/stringify/foldFlowLines.js
68567
+ // node_modules/yaml/dist/stringify/foldFlowLines.js
68503
68568
  var require_foldFlowLines = __commonJS((exports) => {
68504
68569
  var FOLD_FLOW = "flow";
68505
68570
  var FOLD_BLOCK = "block";
@@ -68636,7 +68701,7 @@ ${indent}${text.slice(fold + 1, end2)}`;
68636
68701
  exports.foldFlowLines = foldFlowLines;
68637
68702
  });
68638
68703
 
68639
- // ../../node_modules/yaml/dist/stringify/stringifyString.js
68704
+ // node_modules/yaml/dist/stringify/stringifyString.js
68640
68705
  var require_stringifyString = __commonJS((exports) => {
68641
68706
  var Scalar = require_Scalar();
68642
68707
  var foldFlowLines = require_foldFlowLines();
@@ -68934,7 +68999,7 @@ ${indent}`);
68934
68999
  exports.stringifyString = stringifyString;
68935
69000
  });
68936
69001
 
68937
- // ../../node_modules/yaml/dist/stringify/stringify.js
69002
+ // node_modules/yaml/dist/stringify/stringify.js
68938
69003
  var require_stringify = __commonJS((exports) => {
68939
69004
  var anchors = require_anchors();
68940
69005
  var identity = require_identity();
@@ -69055,7 +69120,7 @@ ${ctx.indent}${str}`;
69055
69120
  exports.stringify = stringify;
69056
69121
  });
69057
69122
 
69058
- // ../../node_modules/yaml/dist/stringify/stringifyPair.js
69123
+ // node_modules/yaml/dist/stringify/stringifyPair.js
69059
69124
  var require_stringifyPair = __commonJS((exports) => {
69060
69125
  var identity = require_identity();
69061
69126
  var Scalar = require_Scalar();
@@ -69191,7 +69256,7 @@ ${ctx.indent}`;
69191
69256
  exports.stringifyPair = stringifyPair;
69192
69257
  });
69193
69258
 
69194
- // ../../node_modules/yaml/dist/log.js
69259
+ // node_modules/yaml/dist/log.js
69195
69260
  var require_log = __commonJS((exports) => {
69196
69261
  var node_process = __require("process");
69197
69262
  function debug(logLevel, ...messages) {
@@ -69210,7 +69275,7 @@ var require_log = __commonJS((exports) => {
69210
69275
  exports.warn = warn2;
69211
69276
  });
69212
69277
 
69213
- // ../../node_modules/yaml/dist/schema/yaml-1.1/merge.js
69278
+ // node_modules/yaml/dist/schema/yaml-1.1/merge.js
69214
69279
  var require_merge = __commonJS((exports) => {
69215
69280
  var identity = require_identity();
69216
69281
  var Scalar = require_Scalar();
@@ -69267,7 +69332,7 @@ var require_merge = __commonJS((exports) => {
69267
69332
  exports.merge = merge2;
69268
69333
  });
69269
69334
 
69270
- // ../../node_modules/yaml/dist/nodes/addPairToJSMap.js
69335
+ // node_modules/yaml/dist/nodes/addPairToJSMap.js
69271
69336
  var require_addPairToJSMap = __commonJS((exports) => {
69272
69337
  var log = require_log();
69273
69338
  var merge2 = require_merge();
@@ -69328,7 +69393,7 @@ var require_addPairToJSMap = __commonJS((exports) => {
69328
69393
  exports.addPairToJSMap = addPairToJSMap;
69329
69394
  });
69330
69395
 
69331
- // ../../node_modules/yaml/dist/nodes/Pair.js
69396
+ // node_modules/yaml/dist/nodes/Pair.js
69332
69397
  var require_Pair = __commonJS((exports) => {
69333
69398
  var createNode = require_createNode();
69334
69399
  var stringifyPair = require_stringifyPair();
@@ -69366,7 +69431,7 @@ var require_Pair = __commonJS((exports) => {
69366
69431
  exports.createPair = createPair;
69367
69432
  });
69368
69433
 
69369
- // ../../node_modules/yaml/dist/stringify/stringifyCollection.js
69434
+ // node_modules/yaml/dist/stringify/stringifyCollection.js
69370
69435
  var require_stringifyCollection = __commonJS((exports) => {
69371
69436
  var identity = require_identity();
69372
69437
  var stringify = require_stringify();
@@ -69518,7 +69583,7 @@ ${indent}${end}`;
69518
69583
  exports.stringifyCollection = stringifyCollection;
69519
69584
  });
69520
69585
 
69521
- // ../../node_modules/yaml/dist/nodes/YAMLMap.js
69586
+ // node_modules/yaml/dist/nodes/YAMLMap.js
69522
69587
  var require_YAMLMap = __commonJS((exports) => {
69523
69588
  var stringifyCollection = require_stringifyCollection();
69524
69589
  var addPairToJSMap = require_addPairToJSMap();
@@ -69645,7 +69710,7 @@ var require_YAMLMap = __commonJS((exports) => {
69645
69710
  exports.findPair = findPair;
69646
69711
  });
69647
69712
 
69648
- // ../../node_modules/yaml/dist/schema/common/map.js
69713
+ // node_modules/yaml/dist/schema/common/map.js
69649
69714
  var require_map = __commonJS((exports) => {
69650
69715
  var identity = require_identity();
69651
69716
  var YAMLMap = require_YAMLMap();
@@ -69664,7 +69729,7 @@ var require_map = __commonJS((exports) => {
69664
69729
  exports.map = map2;
69665
69730
  });
69666
69731
 
69667
- // ../../node_modules/yaml/dist/nodes/YAMLSeq.js
69732
+ // node_modules/yaml/dist/nodes/YAMLSeq.js
69668
69733
  var require_YAMLSeq = __commonJS((exports) => {
69669
69734
  var createNode = require_createNode();
69670
69735
  var stringifyCollection = require_stringifyCollection();
@@ -69757,7 +69822,7 @@ var require_YAMLSeq = __commonJS((exports) => {
69757
69822
  exports.YAMLSeq = YAMLSeq;
69758
69823
  });
69759
69824
 
69760
- // ../../node_modules/yaml/dist/schema/common/seq.js
69825
+ // node_modules/yaml/dist/schema/common/seq.js
69761
69826
  var require_seq = __commonJS((exports) => {
69762
69827
  var identity = require_identity();
69763
69828
  var YAMLSeq = require_YAMLSeq();
@@ -69776,7 +69841,7 @@ var require_seq = __commonJS((exports) => {
69776
69841
  exports.seq = seq;
69777
69842
  });
69778
69843
 
69779
- // ../../node_modules/yaml/dist/schema/common/string.js
69844
+ // node_modules/yaml/dist/schema/common/string.js
69780
69845
  var require_string = __commonJS((exports) => {
69781
69846
  var stringifyString = require_stringifyString();
69782
69847
  var string4 = {
@@ -69792,7 +69857,7 @@ var require_string = __commonJS((exports) => {
69792
69857
  exports.string = string4;
69793
69858
  });
69794
69859
 
69795
- // ../../node_modules/yaml/dist/schema/common/null.js
69860
+ // node_modules/yaml/dist/schema/common/null.js
69796
69861
  var require_null = __commonJS((exports) => {
69797
69862
  var Scalar = require_Scalar();
69798
69863
  var nullTag = {
@@ -69807,7 +69872,7 @@ var require_null = __commonJS((exports) => {
69807
69872
  exports.nullTag = nullTag;
69808
69873
  });
69809
69874
 
69810
- // ../../node_modules/yaml/dist/schema/core/bool.js
69875
+ // node_modules/yaml/dist/schema/core/bool.js
69811
69876
  var require_bool = __commonJS((exports) => {
69812
69877
  var Scalar = require_Scalar();
69813
69878
  var boolTag = {
@@ -69828,7 +69893,7 @@ var require_bool = __commonJS((exports) => {
69828
69893
  exports.boolTag = boolTag;
69829
69894
  });
69830
69895
 
69831
- // ../../node_modules/yaml/dist/stringify/stringifyNumber.js
69896
+ // node_modules/yaml/dist/stringify/stringifyNumber.js
69832
69897
  var require_stringifyNumber = __commonJS((exports) => {
69833
69898
  function stringifyNumber({ format, minFractionDigits, tag, value }) {
69834
69899
  if (typeof value === "bigint")
@@ -69852,7 +69917,7 @@ var require_stringifyNumber = __commonJS((exports) => {
69852
69917
  exports.stringifyNumber = stringifyNumber;
69853
69918
  });
69854
69919
 
69855
- // ../../node_modules/yaml/dist/schema/core/float.js
69920
+ // node_modules/yaml/dist/schema/core/float.js
69856
69921
  var require_float = __commonJS((exports) => {
69857
69922
  var Scalar = require_Scalar();
69858
69923
  var stringifyNumber = require_stringifyNumber();
@@ -69895,7 +69960,7 @@ var require_float = __commonJS((exports) => {
69895
69960
  exports.floatNaN = floatNaN;
69896
69961
  });
69897
69962
 
69898
- // ../../node_modules/yaml/dist/schema/core/int.js
69963
+ // node_modules/yaml/dist/schema/core/int.js
69899
69964
  var require_int = __commonJS((exports) => {
69900
69965
  var stringifyNumber = require_stringifyNumber();
69901
69966
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -69937,7 +70002,7 @@ var require_int = __commonJS((exports) => {
69937
70002
  exports.intOct = intOct;
69938
70003
  });
69939
70004
 
69940
- // ../../node_modules/yaml/dist/schema/core/schema.js
70005
+ // node_modules/yaml/dist/schema/core/schema.js
69941
70006
  var require_schema = __commonJS((exports) => {
69942
70007
  var map2 = require_map();
69943
70008
  var _null4 = require_null();
@@ -69962,7 +70027,7 @@ var require_schema = __commonJS((exports) => {
69962
70027
  exports.schema = schema;
69963
70028
  });
69964
70029
 
69965
- // ../../node_modules/yaml/dist/schema/json/schema.js
70030
+ // node_modules/yaml/dist/schema/json/schema.js
69966
70031
  var require_schema2 = __commonJS((exports) => {
69967
70032
  var Scalar = require_Scalar();
69968
70033
  var map2 = require_map();
@@ -70026,7 +70091,7 @@ var require_schema2 = __commonJS((exports) => {
70026
70091
  exports.schema = schema;
70027
70092
  });
70028
70093
 
70029
- // ../../node_modules/yaml/dist/schema/yaml-1.1/binary.js
70094
+ // node_modules/yaml/dist/schema/yaml-1.1/binary.js
70030
70095
  var require_binary = __commonJS((exports) => {
70031
70096
  var node_buffer = __require("buffer");
70032
70097
  var Scalar = require_Scalar();
@@ -70081,7 +70146,7 @@ var require_binary = __commonJS((exports) => {
70081
70146
  exports.binary = binary;
70082
70147
  });
70083
70148
 
70084
- // ../../node_modules/yaml/dist/schema/yaml-1.1/pairs.js
70149
+ // node_modules/yaml/dist/schema/yaml-1.1/pairs.js
70085
70150
  var require_pairs = __commonJS((exports) => {
70086
70151
  var identity = require_identity();
70087
70152
  var Pair = require_Pair();
@@ -70156,7 +70221,7 @@ ${cn.comment}` : item.comment;
70156
70221
  exports.resolvePairs = resolvePairs;
70157
70222
  });
70158
70223
 
70159
- // ../../node_modules/yaml/dist/schema/yaml-1.1/omap.js
70224
+ // node_modules/yaml/dist/schema/yaml-1.1/omap.js
70160
70225
  var require_omap = __commonJS((exports) => {
70161
70226
  var identity = require_identity();
70162
70227
  var toJS = require_toJS();
@@ -70228,7 +70293,7 @@ var require_omap = __commonJS((exports) => {
70228
70293
  exports.omap = omap;
70229
70294
  });
70230
70295
 
70231
- // ../../node_modules/yaml/dist/schema/yaml-1.1/bool.js
70296
+ // node_modules/yaml/dist/schema/yaml-1.1/bool.js
70232
70297
  var require_bool2 = __commonJS((exports) => {
70233
70298
  var Scalar = require_Scalar();
70234
70299
  function boolStringify({ value, source }, ctx) {
@@ -70257,7 +70322,7 @@ var require_bool2 = __commonJS((exports) => {
70257
70322
  exports.trueTag = trueTag;
70258
70323
  });
70259
70324
 
70260
- // ../../node_modules/yaml/dist/schema/yaml-1.1/float.js
70325
+ // node_modules/yaml/dist/schema/yaml-1.1/float.js
70261
70326
  var require_float2 = __commonJS((exports) => {
70262
70327
  var Scalar = require_Scalar();
70263
70328
  var stringifyNumber = require_stringifyNumber();
@@ -70303,7 +70368,7 @@ var require_float2 = __commonJS((exports) => {
70303
70368
  exports.floatNaN = floatNaN;
70304
70369
  });
70305
70370
 
70306
- // ../../node_modules/yaml/dist/schema/yaml-1.1/int.js
70371
+ // node_modules/yaml/dist/schema/yaml-1.1/int.js
70307
70372
  var require_int2 = __commonJS((exports) => {
70308
70373
  var stringifyNumber = require_stringifyNumber();
70309
70374
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -70379,7 +70444,7 @@ var require_int2 = __commonJS((exports) => {
70379
70444
  exports.intOct = intOct;
70380
70445
  });
70381
70446
 
70382
- // ../../node_modules/yaml/dist/schema/yaml-1.1/set.js
70447
+ // node_modules/yaml/dist/schema/yaml-1.1/set.js
70383
70448
  var require_set = __commonJS((exports) => {
70384
70449
  var identity = require_identity();
70385
70450
  var Pair = require_Pair();
@@ -70462,7 +70527,7 @@ var require_set = __commonJS((exports) => {
70462
70527
  exports.set = set2;
70463
70528
  });
70464
70529
 
70465
- // ../../node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
70530
+ // node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
70466
70531
  var require_timestamp = __commonJS((exports) => {
70467
70532
  var stringifyNumber = require_stringifyNumber();
70468
70533
  function parseSexagesimal(str, asBigInt) {
@@ -70544,7 +70609,7 @@ var require_timestamp = __commonJS((exports) => {
70544
70609
  exports.timestamp = timestamp;
70545
70610
  });
70546
70611
 
70547
- // ../../node_modules/yaml/dist/schema/yaml-1.1/schema.js
70612
+ // node_modules/yaml/dist/schema/yaml-1.1/schema.js
70548
70613
  var require_schema3 = __commonJS((exports) => {
70549
70614
  var map2 = require_map();
70550
70615
  var _null4 = require_null();
@@ -70585,7 +70650,7 @@ var require_schema3 = __commonJS((exports) => {
70585
70650
  exports.schema = schema;
70586
70651
  });
70587
70652
 
70588
- // ../../node_modules/yaml/dist/schema/tags.js
70653
+ // node_modules/yaml/dist/schema/tags.js
70589
70654
  var require_tags = __commonJS((exports) => {
70590
70655
  var map2 = require_map();
70591
70656
  var _null4 = require_null();
@@ -70676,7 +70741,7 @@ var require_tags = __commonJS((exports) => {
70676
70741
  exports.getTags = getTags;
70677
70742
  });
70678
70743
 
70679
- // ../../node_modules/yaml/dist/schema/Schema.js
70744
+ // node_modules/yaml/dist/schema/Schema.js
70680
70745
  var require_Schema = __commonJS((exports) => {
70681
70746
  var identity = require_identity();
70682
70747
  var map2 = require_map();
@@ -70706,7 +70771,7 @@ var require_Schema = __commonJS((exports) => {
70706
70771
  exports.Schema = Schema;
70707
70772
  });
70708
70773
 
70709
- // ../../node_modules/yaml/dist/stringify/stringifyDocument.js
70774
+ // node_modules/yaml/dist/stringify/stringifyDocument.js
70710
70775
  var require_stringifyDocument = __commonJS((exports) => {
70711
70776
  var identity = require_identity();
70712
70777
  var stringify = require_stringify();
@@ -70786,7 +70851,7 @@ var require_stringifyDocument = __commonJS((exports) => {
70786
70851
  exports.stringifyDocument = stringifyDocument;
70787
70852
  });
70788
70853
 
70789
- // ../../node_modules/yaml/dist/doc/Document.js
70854
+ // node_modules/yaml/dist/doc/Document.js
70790
70855
  var require_Document = __commonJS((exports) => {
70791
70856
  var Alias = require_Alias();
70792
70857
  var Collection = require_Collection();
@@ -71021,7 +71086,7 @@ var require_Document = __commonJS((exports) => {
71021
71086
  exports.Document = Document;
71022
71087
  });
71023
71088
 
71024
- // ../../node_modules/yaml/dist/errors.js
71089
+ // node_modules/yaml/dist/errors.js
71025
71090
  var require_errors2 = __commonJS((exports) => {
71026
71091
  class YAMLError extends Error {
71027
71092
  constructor(name, pos, code, message) {
@@ -71086,7 +71151,7 @@ ${pointer}
71086
71151
  exports.prettifyError = prettifyError2;
71087
71152
  });
71088
71153
 
71089
- // ../../node_modules/yaml/dist/compose/resolve-props.js
71154
+ // node_modules/yaml/dist/compose/resolve-props.js
71090
71155
  var require_resolve_props = __commonJS((exports) => {
71091
71156
  function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
71092
71157
  let spaceBefore = false;
@@ -71216,7 +71281,7 @@ var require_resolve_props = __commonJS((exports) => {
71216
71281
  exports.resolveProps = resolveProps;
71217
71282
  });
71218
71283
 
71219
- // ../../node_modules/yaml/dist/compose/util-contains-newline.js
71284
+ // node_modules/yaml/dist/compose/util-contains-newline.js
71220
71285
  var require_util_contains_newline = __commonJS((exports) => {
71221
71286
  function containsNewline(key) {
71222
71287
  if (!key)
@@ -71256,7 +71321,7 @@ var require_util_contains_newline = __commonJS((exports) => {
71256
71321
  exports.containsNewline = containsNewline;
71257
71322
  });
71258
71323
 
71259
- // ../../node_modules/yaml/dist/compose/util-flow-indent-check.js
71324
+ // node_modules/yaml/dist/compose/util-flow-indent-check.js
71260
71325
  var require_util_flow_indent_check = __commonJS((exports) => {
71261
71326
  var utilContainsNewline = require_util_contains_newline();
71262
71327
  function flowIndentCheck(indent, fc, onError) {
@@ -71271,7 +71336,7 @@ var require_util_flow_indent_check = __commonJS((exports) => {
71271
71336
  exports.flowIndentCheck = flowIndentCheck;
71272
71337
  });
71273
71338
 
71274
- // ../../node_modules/yaml/dist/compose/util-map-includes.js
71339
+ // node_modules/yaml/dist/compose/util-map-includes.js
71275
71340
  var require_util_map_includes = __commonJS((exports) => {
71276
71341
  var identity = require_identity();
71277
71342
  function mapIncludes(ctx, items, search) {
@@ -71284,7 +71349,7 @@ var require_util_map_includes = __commonJS((exports) => {
71284
71349
  exports.mapIncludes = mapIncludes;
71285
71350
  });
71286
71351
 
71287
- // ../../node_modules/yaml/dist/compose/resolve-block-map.js
71352
+ // node_modules/yaml/dist/compose/resolve-block-map.js
71288
71353
  var require_resolve_block_map = __commonJS((exports) => {
71289
71354
  var Pair = require_Pair();
71290
71355
  var YAMLMap = require_YAMLMap();
@@ -71391,7 +71456,7 @@ var require_resolve_block_map = __commonJS((exports) => {
71391
71456
  exports.resolveBlockMap = resolveBlockMap;
71392
71457
  });
71393
71458
 
71394
- // ../../node_modules/yaml/dist/compose/resolve-block-seq.js
71459
+ // node_modules/yaml/dist/compose/resolve-block-seq.js
71395
71460
  var require_resolve_block_seq = __commonJS((exports) => {
71396
71461
  var YAMLSeq = require_YAMLSeq();
71397
71462
  var resolveProps = require_resolve_props();
@@ -71439,7 +71504,7 @@ var require_resolve_block_seq = __commonJS((exports) => {
71439
71504
  exports.resolveBlockSeq = resolveBlockSeq;
71440
71505
  });
71441
71506
 
71442
- // ../../node_modules/yaml/dist/compose/resolve-end.js
71507
+ // node_modules/yaml/dist/compose/resolve-end.js
71443
71508
  var require_resolve_end = __commonJS((exports) => {
71444
71509
  function resolveEnd(end, offset, reqSpace, onError) {
71445
71510
  let comment = "";
@@ -71479,7 +71544,7 @@ var require_resolve_end = __commonJS((exports) => {
71479
71544
  exports.resolveEnd = resolveEnd;
71480
71545
  });
71481
71546
 
71482
- // ../../node_modules/yaml/dist/compose/resolve-flow-collection.js
71547
+ // node_modules/yaml/dist/compose/resolve-flow-collection.js
71483
71548
  var require_resolve_flow_collection = __commonJS((exports) => {
71484
71549
  var identity = require_identity();
71485
71550
  var Pair = require_Pair();
@@ -71670,7 +71735,7 @@ var require_resolve_flow_collection = __commonJS((exports) => {
71670
71735
  exports.resolveFlowCollection = resolveFlowCollection;
71671
71736
  });
71672
71737
 
71673
- // ../../node_modules/yaml/dist/compose/compose-collection.js
71738
+ // node_modules/yaml/dist/compose/compose-collection.js
71674
71739
  var require_compose_collection = __commonJS((exports) => {
71675
71740
  var identity = require_identity();
71676
71741
  var Scalar = require_Scalar();
@@ -71732,7 +71797,7 @@ var require_compose_collection = __commonJS((exports) => {
71732
71797
  exports.composeCollection = composeCollection;
71733
71798
  });
71734
71799
 
71735
- // ../../node_modules/yaml/dist/compose/resolve-block-scalar.js
71800
+ // node_modules/yaml/dist/compose/resolve-block-scalar.js
71736
71801
  var require_resolve_block_scalar = __commonJS((exports) => {
71737
71802
  var Scalar = require_Scalar();
71738
71803
  function resolveBlockScalar(ctx, scalar, onError) {
@@ -71925,7 +71990,7 @@ var require_resolve_block_scalar = __commonJS((exports) => {
71925
71990
  exports.resolveBlockScalar = resolveBlockScalar;
71926
71991
  });
71927
71992
 
71928
- // ../../node_modules/yaml/dist/compose/resolve-flow-scalar.js
71993
+ // node_modules/yaml/dist/compose/resolve-flow-scalar.js
71929
71994
  var require_resolve_flow_scalar = __commonJS((exports) => {
71930
71995
  var Scalar = require_Scalar();
71931
71996
  var resolveEnd = require_resolve_end();
@@ -72142,7 +72207,7 @@ var require_resolve_flow_scalar = __commonJS((exports) => {
72142
72207
  exports.resolveFlowScalar = resolveFlowScalar;
72143
72208
  });
72144
72209
 
72145
- // ../../node_modules/yaml/dist/compose/compose-scalar.js
72210
+ // node_modules/yaml/dist/compose/compose-scalar.js
72146
72211
  var require_compose_scalar = __commonJS((exports) => {
72147
72212
  var identity = require_identity();
72148
72213
  var Scalar = require_Scalar();
@@ -72220,7 +72285,7 @@ var require_compose_scalar = __commonJS((exports) => {
72220
72285
  exports.composeScalar = composeScalar;
72221
72286
  });
72222
72287
 
72223
- // ../../node_modules/yaml/dist/compose/util-empty-scalar-position.js
72288
+ // node_modules/yaml/dist/compose/util-empty-scalar-position.js
72224
72289
  var require_util_empty_scalar_position = __commonJS((exports) => {
72225
72290
  function emptyScalarPosition(offset, before, pos) {
72226
72291
  if (before) {
@@ -72247,7 +72312,7 @@ var require_util_empty_scalar_position = __commonJS((exports) => {
72247
72312
  exports.emptyScalarPosition = emptyScalarPosition;
72248
72313
  });
72249
72314
 
72250
- // ../../node_modules/yaml/dist/compose/compose-node.js
72315
+ // node_modules/yaml/dist/compose/compose-node.js
72251
72316
  var require_compose_node = __commonJS((exports) => {
72252
72317
  var Alias = require_Alias();
72253
72318
  var identity = require_identity();
@@ -72350,7 +72415,7 @@ var require_compose_node = __commonJS((exports) => {
72350
72415
  exports.composeNode = composeNode;
72351
72416
  });
72352
72417
 
72353
- // ../../node_modules/yaml/dist/compose/compose-doc.js
72418
+ // node_modules/yaml/dist/compose/compose-doc.js
72354
72419
  var require_compose_doc = __commonJS((exports) => {
72355
72420
  var Document = require_Document();
72356
72421
  var composeNode = require_compose_node();
@@ -72390,7 +72455,7 @@ var require_compose_doc = __commonJS((exports) => {
72390
72455
  exports.composeDoc = composeDoc;
72391
72456
  });
72392
72457
 
72393
- // ../../node_modules/yaml/dist/compose/composer.js
72458
+ // node_modules/yaml/dist/compose/composer.js
72394
72459
  var require_composer = __commonJS((exports) => {
72395
72460
  var node_process = __require("process");
72396
72461
  var directives = require_directives();
@@ -72476,8 +72541,10 @@ ${cb}` : comment;
72476
72541
  }
72477
72542
  }
72478
72543
  if (afterDoc) {
72479
- Array.prototype.push.apply(doc2.errors, this.errors);
72480
- Array.prototype.push.apply(doc2.warnings, this.warnings);
72544
+ for (let i = 0;i < this.errors.length; ++i)
72545
+ doc2.errors.push(this.errors[i]);
72546
+ for (let i = 0;i < this.warnings.length; ++i)
72547
+ doc2.warnings.push(this.warnings[i]);
72481
72548
  } else {
72482
72549
  doc2.errors = this.errors;
72483
72550
  doc2.warnings = this.warnings;
@@ -72579,7 +72646,7 @@ ${end.comment}` : end.comment;
72579
72646
  exports.Composer = Composer;
72580
72647
  });
72581
72648
 
72582
- // ../../node_modules/yaml/dist/parse/cst-scalar.js
72649
+ // node_modules/yaml/dist/parse/cst-scalar.js
72583
72650
  var require_cst_scalar = __commonJS((exports) => {
72584
72651
  var resolveBlockScalar = require_resolve_block_scalar();
72585
72652
  var resolveFlowScalar = require_resolve_flow_scalar();
@@ -72769,7 +72836,7 @@ var require_cst_scalar = __commonJS((exports) => {
72769
72836
  exports.setScalarValue = setScalarValue;
72770
72837
  });
72771
72838
 
72772
- // ../../node_modules/yaml/dist/parse/cst-stringify.js
72839
+ // node_modules/yaml/dist/parse/cst-stringify.js
72773
72840
  var require_cst_stringify = __commonJS((exports) => {
72774
72841
  var stringify = (cst) => ("type" in cst) ? stringifyToken(cst) : stringifyItem(cst);
72775
72842
  function stringifyToken(token) {
@@ -72827,7 +72894,7 @@ var require_cst_stringify = __commonJS((exports) => {
72827
72894
  exports.stringify = stringify;
72828
72895
  });
72829
72896
 
72830
- // ../../node_modules/yaml/dist/parse/cst-visit.js
72897
+ // node_modules/yaml/dist/parse/cst-visit.js
72831
72898
  var require_cst_visit = __commonJS((exports) => {
72832
72899
  var BREAK = Symbol("break visit");
72833
72900
  var SKIP = Symbol("skip children");
@@ -72886,7 +72953,7 @@ var require_cst_visit = __commonJS((exports) => {
72886
72953
  exports.visit = visit;
72887
72954
  });
72888
72955
 
72889
- // ../../node_modules/yaml/dist/parse/cst.js
72956
+ // node_modules/yaml/dist/parse/cst.js
72890
72957
  var require_cst = __commonJS((exports) => {
72891
72958
  var cstScalar = require_cst_scalar();
72892
72959
  var cstStringify = require_cst_stringify();
@@ -72987,7 +73054,7 @@ var require_cst = __commonJS((exports) => {
72987
73054
  exports.tokenType = tokenType;
72988
73055
  });
72989
73056
 
72990
- // ../../node_modules/yaml/dist/parse/lexer.js
73057
+ // node_modules/yaml/dist/parse/lexer.js
72991
73058
  var require_lexer = __commonJS((exports) => {
72992
73059
  var cst = require_cst();
72993
73060
  function isEmpty(ch) {
@@ -73189,7 +73256,7 @@ var require_lexer = __commonJS((exports) => {
73189
73256
  const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
73190
73257
  this.indentNext = this.indentValue + 1;
73191
73258
  this.indentValue += n;
73192
- return yield* this.parseBlockStart();
73259
+ return "block-start";
73193
73260
  }
73194
73261
  return "doc";
73195
73262
  }
@@ -73496,26 +73563,37 @@ var require_lexer = __commonJS((exports) => {
73496
73563
  return 0;
73497
73564
  }
73498
73565
  *pushIndicators() {
73499
- switch (this.charAt(0)) {
73500
- case "!":
73501
- return (yield* this.pushTag()) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators());
73502
- case "&":
73503
- return (yield* this.pushUntil(isNotAnchorChar)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators());
73504
- case "-":
73505
- case "?":
73506
- case ":": {
73507
- const inFlow = this.flowLevel > 0;
73508
- const ch1 = this.charAt(1);
73509
- if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) {
73510
- if (!inFlow)
73511
- this.indentNext = this.indentValue + 1;
73512
- else if (this.flowKey)
73513
- this.flowKey = false;
73514
- return (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators());
73566
+ let n = 0;
73567
+ loop:
73568
+ while (true) {
73569
+ switch (this.charAt(0)) {
73570
+ case "!":
73571
+ n += yield* this.pushTag();
73572
+ n += yield* this.pushSpaces(true);
73573
+ continue loop;
73574
+ case "&":
73575
+ n += yield* this.pushUntil(isNotAnchorChar);
73576
+ n += yield* this.pushSpaces(true);
73577
+ continue loop;
73578
+ case "-":
73579
+ case "?":
73580
+ case ":": {
73581
+ const inFlow = this.flowLevel > 0;
73582
+ const ch1 = this.charAt(1);
73583
+ if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) {
73584
+ if (!inFlow)
73585
+ this.indentNext = this.indentValue + 1;
73586
+ else if (this.flowKey)
73587
+ this.flowKey = false;
73588
+ n += yield* this.pushCount(1);
73589
+ n += yield* this.pushSpaces(true);
73590
+ continue loop;
73591
+ }
73592
+ }
73515
73593
  }
73594
+ break loop;
73516
73595
  }
73517
- }
73518
- return 0;
73596
+ return n;
73519
73597
  }
73520
73598
  *pushTag() {
73521
73599
  if (this.charAt(1) === "<") {
@@ -73573,7 +73651,7 @@ var require_lexer = __commonJS((exports) => {
73573
73651
  exports.Lexer = Lexer;
73574
73652
  });
73575
73653
 
73576
- // ../../node_modules/yaml/dist/parse/line-counter.js
73654
+ // node_modules/yaml/dist/parse/line-counter.js
73577
73655
  var require_line_counter = __commonJS((exports) => {
73578
73656
  class LineCounter {
73579
73657
  constructor() {
@@ -73601,7 +73679,7 @@ var require_line_counter = __commonJS((exports) => {
73601
73679
  exports.LineCounter = LineCounter;
73602
73680
  });
73603
73681
 
73604
- // ../../node_modules/yaml/dist/parse/parser.js
73682
+ // node_modules/yaml/dist/parse/parser.js
73605
73683
  var require_parser2 = __commonJS((exports) => {
73606
73684
  var node_process = __require("process");
73607
73685
  var cst = require_cst();
@@ -73669,6 +73747,13 @@ var require_parser2 = __commonJS((exports) => {
73669
73747
  while (prev[++i]?.type === "space") {}
73670
73748
  return prev.splice(i, prev.length);
73671
73749
  }
73750
+ function arrayPushArray(target, source) {
73751
+ if (source.length < 1e5)
73752
+ Array.prototype.push.apply(target, source);
73753
+ else
73754
+ for (let i = 0;i < source.length; ++i)
73755
+ target.push(source[i]);
73756
+ }
73672
73757
  function fixFlowSeqItems(fc) {
73673
73758
  if (fc.start.type === "flow-seq-start") {
73674
73759
  for (const it of fc.items) {
@@ -73678,11 +73763,11 @@ var require_parser2 = __commonJS((exports) => {
73678
73763
  delete it.key;
73679
73764
  if (isFlowToken(it.value)) {
73680
73765
  if (it.value.end)
73681
- Array.prototype.push.apply(it.value.end, it.sep);
73766
+ arrayPushArray(it.value.end, it.sep);
73682
73767
  else
73683
73768
  it.value.end = it.sep;
73684
73769
  } else
73685
- Array.prototype.push.apply(it.start, it.sep);
73770
+ arrayPushArray(it.start, it.sep);
73686
73771
  delete it.sep;
73687
73772
  }
73688
73773
  }
@@ -74022,7 +74107,7 @@ var require_parser2 = __commonJS((exports) => {
74022
74107
  const prev = map2.items[map2.items.length - 2];
74023
74108
  const end = prev?.value?.end;
74024
74109
  if (Array.isArray(end)) {
74025
- Array.prototype.push.apply(end, it.start);
74110
+ arrayPushArray(end, it.start);
74026
74111
  end.push(this.sourceToken);
74027
74112
  map2.items.pop();
74028
74113
  return;
@@ -74210,7 +74295,7 @@ var require_parser2 = __commonJS((exports) => {
74210
74295
  const prev = seq.items[seq.items.length - 2];
74211
74296
  const end = prev?.value?.end;
74212
74297
  if (Array.isArray(end)) {
74213
- Array.prototype.push.apply(end, it.start);
74298
+ arrayPushArray(end, it.start);
74214
74299
  end.push(this.sourceToken);
74215
74300
  seq.items.pop();
74216
74301
  return;
@@ -74450,7 +74535,7 @@ var require_parser2 = __commonJS((exports) => {
74450
74535
  exports.Parser = Parser;
74451
74536
  });
74452
74537
 
74453
- // ../../node_modules/yaml/dist/public-api.js
74538
+ // node_modules/yaml/dist/public-api.js
74454
74539
  var require_public_api = __commonJS((exports) => {
74455
74540
  var composer = require_composer();
74456
74541
  var Document = require_Document();
@@ -74544,7 +74629,7 @@ var require_public_api = __commonJS((exports) => {
74544
74629
  exports.stringify = stringify;
74545
74630
  });
74546
74631
 
74547
- // ../../node_modules/yaml/dist/index.js
74632
+ // node_modules/yaml/dist/index.js
74548
74633
  var require_dist4 = __commonJS((exports) => {
74549
74634
  var composer = require_composer();
74550
74635
  var Document = require_Document();
@@ -189277,7 +189362,7 @@ import { fileURLToPath as fileURLToPath9 } from "url";
189277
189362
  // package.json
189278
189363
  var package_default = {
189279
189364
  name: "@eigenpal/cli",
189280
- version: "0.10.56",
189365
+ version: "0.11.1",
189281
189366
  description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
189282
189367
  keywords: [
189283
189368
  "eigenpal",
@@ -189393,6 +189478,12 @@ class ApiClient {
189393
189478
  this.apiKey = config.apiKey;
189394
189479
  this.tenantId = config.tenantId;
189395
189480
  }
189481
+ resolvePath(path) {
189482
+ if (path === "/api/v1" || path.startsWith("/api/v1/")) {
189483
+ return `/v1${path.slice("/api/v1".length)}`;
189484
+ }
189485
+ return path;
189486
+ }
189396
189487
  headers(extra = {}) {
189397
189488
  return {
189398
189489
  Authorization: `Bearer ${this.apiKey}`,
@@ -189421,7 +189512,7 @@ class ApiClient {
189421
189512
  return res;
189422
189513
  }
189423
189514
  async get(path, params) {
189424
- let url = `${this.baseUrl}${path}`;
189515
+ let url = `${this.baseUrl}${this.resolvePath(path)}`;
189425
189516
  if (params) {
189426
189517
  const qs = new URLSearchParams(params).toString();
189427
189518
  if (qs)
@@ -189431,7 +189522,7 @@ class ApiClient {
189431
189522
  return this.handleResponse(res, url);
189432
189523
  }
189433
189524
  async post(path, body) {
189434
- const url = `${this.baseUrl}${path}`;
189525
+ const url = `${this.baseUrl}${this.resolvePath(path)}`;
189435
189526
  const res = await fetch(url, {
189436
189527
  method: "POST",
189437
189528
  headers: this.headers({ "Content-Type": "application/json" }),
@@ -189440,7 +189531,7 @@ class ApiClient {
189440
189531
  return this.handleResponse(res, url);
189441
189532
  }
189442
189533
  async put(path, body) {
189443
- const url = `${this.baseUrl}${path}`;
189534
+ const url = `${this.baseUrl}${this.resolvePath(path)}`;
189444
189535
  const res = await fetch(url, {
189445
189536
  method: "PUT",
189446
189537
  headers: this.headers({ "Content-Type": "application/json" }),
@@ -189449,7 +189540,7 @@ class ApiClient {
189449
189540
  return this.handleResponse(res, url);
189450
189541
  }
189451
189542
  async patch(path, body) {
189452
- const url = `${this.baseUrl}${path}`;
189543
+ const url = `${this.baseUrl}${this.resolvePath(path)}`;
189453
189544
  const res = await fetch(url, {
189454
189545
  method: "PATCH",
189455
189546
  headers: this.headers({ "Content-Type": "application/json" }),
@@ -189458,7 +189549,7 @@ class ApiClient {
189458
189549
  return this.handleResponse(res, url);
189459
189550
  }
189460
189551
  async postFormData(path, formData) {
189461
- const url = `${this.baseUrl}${path}`;
189552
+ const url = `${this.baseUrl}${this.resolvePath(path)}`;
189462
189553
  const res = await fetch(url, {
189463
189554
  method: "POST",
189464
189555
  headers: this.headers(),
@@ -189467,7 +189558,7 @@ class ApiClient {
189467
189558
  return this.handleResponse(res, url);
189468
189559
  }
189469
189560
  async putFormData(path, formData) {
189470
- const url = `${this.baseUrl}${path}`;
189561
+ const url = `${this.baseUrl}${this.resolvePath(path)}`;
189471
189562
  const res = await fetch(url, {
189472
189563
  method: "PUT",
189473
189564
  headers: this.headers(),
@@ -189476,7 +189567,7 @@ class ApiClient {
189476
189567
  return this.handleResponse(res, url);
189477
189568
  }
189478
189569
  async delete(path) {
189479
- const url = `${this.baseUrl}${path}`;
189570
+ const url = `${this.baseUrl}${this.resolvePath(path)}`;
189480
189571
  const res = await fetch(url, {
189481
189572
  method: "DELETE",
189482
189573
  headers: this.headers()
@@ -189484,7 +189575,7 @@ class ApiClient {
189484
189575
  return this.handleResponse(res, url);
189485
189576
  }
189486
189577
  async getStream(path) {
189487
- const url = `${this.baseUrl}${path}`;
189578
+ const url = `${this.baseUrl}${this.resolvePath(path)}`;
189488
189579
  const res = await fetch(url, {
189489
189580
  headers: this.headers()
189490
189581
  });
@@ -189495,7 +189586,7 @@ class ApiClient {
189495
189586
  return res;
189496
189587
  }
189497
189588
  async postStream(path, body) {
189498
- const url = `${this.baseUrl}${path}`;
189589
+ const url = `${this.baseUrl}${this.resolvePath(path)}`;
189499
189590
  const res = await fetch(url, {
189500
189591
  method: "POST",
189501
189592
  headers: this.headers({ "Content-Type": "application/json" }),
@@ -189505,7 +189596,7 @@ class ApiClient {
189505
189596
  return res;
189506
189597
  }
189507
189598
  async postFormDataStream(path, formData) {
189508
- const url = `${this.baseUrl}${path}`;
189599
+ const url = `${this.baseUrl}${this.resolvePath(path)}`;
189509
189600
  const res = await fetch(url, {
189510
189601
  method: "POST",
189511
189602
  headers: this.headers(),
@@ -189613,6 +189704,7 @@ var env = createEnv({
189613
189704
  EIGENPAL_API_KEY: exports_external.string().optional(),
189614
189705
  EIGENPAL_TENANT_ID: exports_external.string().optional(),
189615
189706
  EIGENPAL_DIR: exports_external.string().optional(),
189707
+ EIGENPAL_MULTIPART_MAX_BYTES: exports_external.string().optional(),
189616
189708
  EIGENPAL_PROFILE: exports_external.string().optional(),
189617
189709
  EIGENPAL_EVAL_GRACE_MS: exports_external.string().optional(),
189618
189710
  DEBUG: exports_external.string().optional(),
@@ -189876,7 +189968,7 @@ function writeRecordCountHint(shown, total, label) {
189876
189968
  }
189877
189969
 
189878
189970
  // src/lib/config.ts
189879
- var DEFAULT_BASE_URL = "https://studio.eigenpal.com";
189971
+ var DEFAULT_BASE_URL = "https://api.eigenpal.com";
189880
189972
  function resolveConfig(flags) {
189881
189973
  const usingEnvKey = !!env.EIGENPAL_API_KEY;
189882
189974
  const profile = usingEnvKey ? null : readActiveCredentials();
@@ -190138,7 +190230,7 @@ async function resolveGitAuthorIdentity(config2) {
190138
190230
  email: env2.GIT_AUTHOR_EMAIL
190139
190231
  };
190140
190232
  }
190141
- const auth = AuthCheckSchema.parse(await new ApiClient(config2).get("/api/v1/auth/check"));
190233
+ const auth = AuthCheckSchema.parse(await new ApiClient(config2).get("/v1/auth/check"));
190142
190234
  const email3 = auth.email ?? `${auth.keyId}@api-keys.eigenpal.local`;
190143
190235
  const name = auth.name?.trim() || auth.email || `Eigenpal API Key ${auth.keyId}`;
190144
190236
  return { name, email: email3 };
@@ -190986,7 +191078,7 @@ async function readSecretInput(opts) {
190986
191078
  throw new Error("Secret value input is required in noninteractive mode.");
190987
191079
  }
190988
191080
  async function encryptSecretsViaApi(client, secrets) {
190989
- const payload = await client.post("/api/v1/source/secrets/encrypt", { secrets });
191081
+ const payload = await client.post("/v1/source/secrets/encrypt", { secrets });
190990
191082
  return payload.secrets ?? {};
190991
191083
  }
190992
191084
  async function setSecret(name, opts) {
@@ -191119,7 +191211,7 @@ async function getSourceRepository(config2, opts = {}) {
191119
191211
  if (explicit)
191120
191212
  return explicit;
191121
191213
  const client = new ApiClient(config2);
191122
- return parseSourceRepository(await client.get("/api/v1/source/repository"));
191214
+ return parseSourceRepository(await client.get("/v1/source/repository"));
191123
191215
  }
191124
191216
  function parsePackageRef(input) {
191125
191217
  const [rawPackage, rawRef, extra] = input.split("@");
@@ -191167,7 +191259,7 @@ async function listPackageReleases(input) {
191167
191259
  return remote;
191168
191260
  }
191169
191261
  const client = new ApiClient(input.config);
191170
- return ReleasesSchema.parse(await client.get("/api/v1/source/releases", { packagePath: input.packagePath })).releases;
191262
+ return ReleasesSchema.parse(await client.get("/v1/source/releases", { packagePath: input.packagePath })).releases;
191171
191263
  }
191172
191264
  function listRemotePackageReleases(config2, repository, packagePath) {
191173
191265
  const tagPrefix = `${pathToDottedPackageName(packagePath)}@`;
@@ -191417,7 +191509,7 @@ function formatTriggerState(triggers2) {
191417
191509
  return ["api", "email", "manual", "cron"].filter((key) => triggers2[key]).join(",");
191418
191510
  }
191419
191511
  async function findAgentAutomationBySearch(client, target) {
191420
- const payload = await client.get("/api/v1/automations", {
191512
+ const payload = await client.get("/v1/automations", {
191421
191513
  type: "agent",
191422
191514
  search: target,
191423
191515
  limit: "100"
@@ -191428,7 +191520,7 @@ async function findAgentAutomationBySearch(client, target) {
191428
191520
  async function getPublicAgentAutomation(client, target) {
191429
191521
  const publicTarget = publicAgentAutomationTarget(target);
191430
191522
  try {
191431
- const automation = await client.get(`/api/v1/automations/${encodeURIComponent(publicTarget)}`);
191523
+ const automation = await client.get(`/v1/automations/${encodeURIComponent(publicTarget)}`);
191432
191524
  if (automation.type !== "agent") {
191433
191525
  throw new Error(`Automation ${target} is not an agent.`);
191434
191526
  }
@@ -191500,7 +191592,7 @@ async function retrySyncRequest(request, opts = {}) {
191500
191592
  }
191501
191593
  async function syncLatestAutomation(client, packagePath) {
191502
191594
  const automation = pathToDottedPackageName(packagePath);
191503
- await retrySyncRequest(() => client.post(`/api/v1/automations/${encodeURIComponent(automation)}/sync`));
191595
+ await retrySyncRequest(() => client.post(`/v1/automations/${encodeURIComponent(automation)}/sync`));
191504
191596
  success2(`Synced ${automation} to latest release.`);
191505
191597
  }
191506
191598
  async function cloneSource(opts) {
@@ -191557,7 +191649,7 @@ description: ${automation.description}`);
191557
191649
  async function versions2(target, opts) {
191558
191650
  const packagePath = resolvePackagePath(target);
191559
191651
  const client = new ApiClient(resolveConfig(opts));
191560
- const parsed = ReleasesSchema.parse(await client.get("/api/v1/source/releases", { packagePath }));
191652
+ const parsed = ReleasesSchema.parse(await client.get("/v1/source/releases", { packagePath }));
191561
191653
  const sorted = { ...parsed, releases: sortReleasesNewestFirst(parsed.releases) };
191562
191654
  if (opts.json)
191563
191655
  console.log(JSON.stringify(sorted, null, 2));
@@ -191595,11 +191687,11 @@ async function release(versionOrBump, dir, opts) {
191595
191687
  await pushCurrentBranch({ config: config2, gitRoot: resolvedContext.gitRoot });
191596
191688
  }
191597
191689
  const client = new ApiClient(config2);
191598
- const version2 = ["patch", "minor", "major"].includes(versionOrBump) ? bumpReleaseVersion(ReleasesSchema.parse(await client.get("/api/v1/source/releases", { packagePath: resolvedContext.packagePath })).releases, versionOrBump) : versionOrBump;
191690
+ const version2 = ["patch", "minor", "major"].includes(versionOrBump) ? bumpReleaseVersion(ReleasesSchema.parse(await client.get("/v1/source/releases", { packagePath: resolvedContext.packagePath })).releases, versionOrBump) : versionOrBump;
191599
191691
  if (!/^\d+\.\d+\.\d+$/.test(version2)) {
191600
191692
  throw new Error("Release version must be X.Y.Z, patch, minor, or major.");
191601
191693
  }
191602
- const existing = ReleasesSchema.parse(await client.get("/api/v1/source/releases", {
191694
+ const existing = ReleasesSchema.parse(await client.get("/v1/source/releases", {
191603
191695
  packagePath: resolvedContext.packagePath,
191604
191696
  version: version2
191605
191697
  }));
@@ -192599,7 +192691,7 @@ async function writeBase64File(file2, contentBase64) {
192599
192691
  }
192600
192692
  async function pollRun(client, executionId, interval, maxWait) {
192601
192693
  const started = Date.now();
192602
- const base = `/api/v1/runs/${encodeURIComponent(executionId)}`;
192694
+ const base = `/v1/runs/${encodeURIComponent(executionId)}`;
192603
192695
  for (;; ) {
192604
192696
  const payload = await client.get(base);
192605
192697
  const status = payload.execution?.status;
@@ -192617,7 +192709,7 @@ async function pollRun(client, executionId, interval, maxWait) {
192617
192709
  async function pollExperiment(client, automationId, batchId, interval, maxWait) {
192618
192710
  const started = Date.now();
192619
192711
  for (;; ) {
192620
- const payload = await client.get(`/api/v1/automations/${encodeURIComponent(automationId)}/experiments/${encodeURIComponent(batchId)}`);
192712
+ const payload = await client.get(`/v1/automations/${encodeURIComponent(automationId)}/experiments/${encodeURIComponent(batchId)}`);
192621
192713
  if (payload.status === "completed")
192622
192714
  return payload;
192623
192715
  if (Date.now() - started > maxWait * 1000) {
@@ -193049,7 +193141,7 @@ Layout (mirrors the server import rules)
193049
193141
  }
193050
193142
  async function listDataset(agentId, opts) {
193051
193143
  const client = buildClient(opts);
193052
- const payload = await client.get(`/api/v1/automations/${encodeURIComponent(agentAutomationId(agentId))}/examples`, compactParams(opts));
193144
+ const payload = await client.get(`/v1/automations/${encodeURIComponent(agentAutomationId(agentId))}/examples`, compactParams(opts));
193053
193145
  const examples = payload.data ?? [];
193054
193146
  if (opts.json)
193055
193147
  return printJson(payload);
@@ -193070,14 +193162,14 @@ async function pushDataset(agentId, opts) {
193070
193162
  form.set("file", new Blob([archive], { type: "application/zip" }), stat.isDirectory() ? "dataset.zip" : path8.basename(resolved));
193071
193163
  form.set("mode", opts.mode);
193072
193164
  const client = buildClient(opts);
193073
- const payload = await client.postFormData(`/api/v1/automations/${encodeURIComponent(agentAutomationId(agentId))}/dataset/import`, form);
193165
+ const payload = await client.postFormData(`/v1/automations/${encodeURIComponent(agentAutomationId(agentId))}/dataset/import`, form);
193074
193166
  if (opts.json)
193075
193167
  return printJson(payload);
193076
193168
  success2(`${opts.mode === "replace" ? "Replaced" : "Uploaded"} dataset archive`);
193077
193169
  }
193078
193170
  async function pullDataset(agentId, opts) {
193079
193171
  const client = buildClient(opts);
193080
- const res = await client.getStream(`/api/v1/automations/${encodeURIComponent(agentAutomationId(agentId))}/dataset/export`);
193172
+ const res = await client.getStream(`/v1/automations/${encodeURIComponent(agentAutomationId(agentId))}/dataset/export`);
193081
193173
  const archive = Buffer.from(await res.arrayBuffer());
193082
193174
  const out = path8.resolve(opts.out ?? DATASET_DIR);
193083
193175
  await fs3.mkdir(path8.dirname(out), { recursive: true });
@@ -193166,7 +193258,7 @@ async function pullAgentEnv(target, opts) {
193166
193258
  const requests = target ? await collectEncryptedSecretsForTarget(client, target) : await collectEncryptedSecrets(path9.resolve(opts.dir ?? "."));
193167
193259
  if (requests.length === 0)
193168
193260
  return;
193169
- const payload = await client.post("/api/v1/source/secrets/decrypt", {
193261
+ const payload = await client.post("/v1/source/secrets/decrypt", {
193170
193262
  secrets: requests.map(({ sourcePath, secretName, encrypted }) => ({
193171
193263
  sourcePath,
193172
193264
  secretName,
@@ -193187,7 +193279,7 @@ async function pullAgentEnv(target, opts) {
193187
193279
  async function collectEncryptedSecretsForTarget(client, target) {
193188
193280
  const parsed = parseAgentTarget(target);
193189
193281
  const packageRef = `${parsed.packageName}@${parsed.sourceRef ?? "latest"}`;
193190
- const lockfile = await client.get("/api/v1/source/lockfile", { packageRef });
193282
+ const lockfile = await client.get("/v1/source/lockfile", { packageRef });
193191
193283
  const requests = [];
193192
193284
  const seen = new Set;
193193
193285
  for (const packageNode of flattenLockPackages(lockfile.root)) {
@@ -193217,7 +193309,7 @@ function flattenLockPackages(root) {
193217
193309
  }
193218
193310
  async function readOptionalSourceFile(client, query) {
193219
193311
  try {
193220
- const payload = await client.get("/api/v1/source/raw", query);
193312
+ const payload = await client.get("/v1/source/raw", query);
193221
193313
  return typeof payload.content === "string" ? payload.content : null;
193222
193314
  } catch (err2) {
193223
193315
  if (err2 instanceof ApiError && err2.status === 404)
@@ -193563,8 +193655,8 @@ function renderBatchDiffHuman(diff) {
193563
193655
  `);
193564
193656
  }
193565
193657
  async function fetchEvalResults(client, experimentId) {
193566
- const ref = await client.get(`/api/v1/experiments/${encodeURIComponent(experimentId)}`);
193567
- const raw = await client.get(`/api/v1/automations/${encodeURIComponent(ref.automationId)}/experiments/${encodeURIComponent(experimentId)}/export`, { format: "json" });
193658
+ const ref = await client.get(`/v1/experiments/${encodeURIComponent(experimentId)}`);
193659
+ const raw = await client.get(`/v1/automations/${encodeURIComponent(ref.automationId)}/experiments/${encodeURIComponent(experimentId)}/export`, { format: "json" });
193568
193660
  if (!raw || !Array.isArray(raw.results)) {
193569
193661
  throw new Error(`Unexpected experiment export response for ${experimentId}: missing 'results' array`);
193570
193662
  }
@@ -193587,7 +193679,7 @@ function registerExperimentCommands(agent) {
193587
193679
  async function runExperiment(agentId, opts) {
193588
193680
  const client = buildClient(opts);
193589
193681
  const automationId = agentAutomationId(agentId);
193590
- let payload = await client.post(`/api/v1/automations/${encodeURIComponent(automationId)}/experiments`, {
193682
+ let payload = await client.post(`/v1/automations/${encodeURIComponent(automationId)}/experiments`, {
193591
193683
  ...opts.exampleId ? { examples: [opts.exampleId] } : {}
193592
193684
  });
193593
193685
  const experimentId = payload.id ?? payload.batchId;
@@ -193599,19 +193691,19 @@ async function runExperiment(agentId, opts) {
193599
193691
  async function experimentStatus(agentId, batchId, opts) {
193600
193692
  const client = buildClient(opts);
193601
193693
  const automationId = agentAutomationId(agentId);
193602
- const payload = opts.watch ? await pollExperiment(client, automationId, batchId, opts.interval, opts.maxWait) : await client.get(`/api/v1/automations/${encodeURIComponent(automationId)}/experiments/${encodeURIComponent(batchId)}`);
193694
+ const payload = opts.watch ? await pollExperiment(client, automationId, batchId, opts.interval, opts.maxWait) : await client.get(`/v1/automations/${encodeURIComponent(automationId)}/experiments/${encodeURIComponent(batchId)}`);
193603
193695
  renderGeneric(payload, opts, `Experiment ${batchId}`);
193604
193696
  }
193605
193697
  async function experimentResults(agentId, batchId, opts) {
193606
193698
  const client = buildClient(opts);
193607
193699
  const automationId = agentAutomationId(agentId);
193608
- const selected = batchId ?? String((await client.get(`/api/v1/automations/${encodeURIComponent(automationId)}/experiments`, {
193700
+ const selected = batchId ?? String((await client.get(`/v1/automations/${encodeURIComponent(automationId)}/experiments`, {
193609
193701
  limit: "1",
193610
193702
  offset: "0"
193611
193703
  })).data?.[0]?.id ?? "");
193612
193704
  if (!selected)
193613
193705
  throw new Error("No experiment batch found");
193614
- const payload = await client.get(`/api/v1/automations/${encodeURIComponent(automationId)}/experiments/${encodeURIComponent(selected)}`);
193706
+ const payload = await client.get(`/v1/automations/${encodeURIComponent(automationId)}/experiments/${encodeURIComponent(selected)}`);
193615
193707
  const content = opts.format === "json" ? JSON.stringify(payload, null, 2) : toCsv(payload.runs, ["id", "status", "exampleId"]);
193616
193708
  if (opts.out) {
193617
193709
  await fs5.writeFile(opts.out, content);
@@ -193624,7 +193716,7 @@ async function experimentResults(agentId, batchId, opts) {
193624
193716
  async function listExperiments(agentId, opts) {
193625
193717
  const client = buildClient(opts);
193626
193718
  const automationId = agentAutomationId(agentId);
193627
- const payload = await client.get(`/api/v1/automations/${encodeURIComponent(automationId)}/experiments`, compactParams(opts));
193719
+ const payload = await client.get(`/v1/automations/${encodeURIComponent(automationId)}/experiments`, compactParams(opts));
193628
193720
  const experiments = payload.data ?? [];
193629
193721
  if (opts.batchId) {
193630
193722
  payload.data = experiments.filter((row) => row.id === opts.batchId || row.batchId === opts.batchId);
@@ -193663,7 +193755,7 @@ async function cancelExperiment(agentId, batchId, opts) {
193663
193755
  if (!(opts.yes || process.stdin.isTTY))
193664
193756
  throw new Error("Pass --yes to cancel in non-interactive mode");
193665
193757
  const client = buildClient(opts);
193666
- const payload = await client.post(`/api/v1/automations/${encodeURIComponent(agentAutomationId(agentId))}/experiments/${encodeURIComponent(batchId)}/cancel`);
193758
+ const payload = await client.post(`/v1/automations/${encodeURIComponent(agentAutomationId(agentId))}/experiments/${encodeURIComponent(batchId)}/cancel`);
193667
193759
  renderGeneric(payload, opts, `Cancelled experiment ${batchId}`);
193668
193760
  }
193669
193761
 
@@ -193683,7 +193775,7 @@ function registerAgentFileCommands(agent) {
193683
193775
  async function listAgentFiles(agentId, opts) {
193684
193776
  const client = buildClient(opts);
193685
193777
  const packagePath = await resolveAgentPackagePath2(client, agentId);
193686
- const payload = await client.get("/api/v1/source/tree", {
193778
+ const payload = await client.get("/v1/source/tree", {
193687
193779
  packagePath,
193688
193780
  ...opts.path ? { prefix: normalizeAgentFilePath(opts.path, { allowEmpty: true }) } : {}
193689
193781
  });
@@ -193735,7 +193827,7 @@ async function buildAgentFileDiff(agentId, remotePath, localPath, opts) {
193735
193827
  };
193736
193828
  }
193737
193829
  async function resolveAgentPackagePath2(client, agentId) {
193738
- const automation = await client.get(`/api/v1/automations/${encodeURIComponent(agentAutomationId(agentId))}`);
193830
+ const automation = await client.get(`/v1/automations/${encodeURIComponent(agentAutomationId(agentId))}`);
193739
193831
  if (automation.type !== "agent" || !automation.slug) {
193740
193832
  throw new Error(`Agent not found: ${agentId}`);
193741
193833
  }
@@ -193745,7 +193837,7 @@ async function readAgentFile(client, agentId, remotePath) {
193745
193837
  const packagePath = await resolveAgentPackagePath2(client, agentId);
193746
193838
  const relativePath = normalizeAgentFilePath(remotePath);
193747
193839
  const sourcePath = `${packagePath}/${relativePath}`;
193748
- const payload = await client.get("/api/v1/source/raw", {
193840
+ const payload = await client.get("/v1/source/raw", {
193749
193841
  path: sourcePath
193750
193842
  });
193751
193843
  return {
@@ -193816,7 +193908,7 @@ function registerSessionCommands(agent) {
193816
193908
  }
193817
193909
  async function listSessions(agentId, opts) {
193818
193910
  const client = buildClient(opts);
193819
- const payload = await client.get(`/api/v1/agents/${encodeURIComponent(agentId)}/sessions`, compactParams(opts));
193911
+ const payload = await client.get(`/v1/agents/${encodeURIComponent(agentId)}/sessions`, compactParams(opts));
193820
193912
  if (opts.json)
193821
193913
  return printJson(payload);
193822
193914
  console.log(table(payload.sessions, [
@@ -193827,17 +193919,17 @@ async function listSessions(agentId, opts) {
193827
193919
  }
193828
193920
  async function getSession(sessionId, opts) {
193829
193921
  const client = buildClient(opts);
193830
- renderGeneric(await client.get(`/api/v1/agents/sessions/${encodeURIComponent(sessionId)}`), opts, `Session ${sessionId}`);
193922
+ renderGeneric(await client.get(`/v1/agents/sessions/${encodeURIComponent(sessionId)}`), opts, `Session ${sessionId}`);
193831
193923
  }
193832
193924
  async function startSession(agentId, opts) {
193833
193925
  const client = buildClient(opts);
193834
- renderGeneric(await client.post(`/api/v1/agents/${encodeURIComponent(agentId)}/sessions`, {
193926
+ renderGeneric(await client.post(`/v1/agents/${encodeURIComponent(agentId)}/sessions`, {
193835
193927
  ...opts.title ? { title: opts.title } : {}
193836
193928
  }), opts, "Started session");
193837
193929
  }
193838
193930
  async function messageSession(sessionId, opts) {
193839
193931
  const client = buildClient(opts);
193840
- renderGeneric(await client.post(`/api/v1/agents/sessions/${encodeURIComponent(sessionId)}`, {
193932
+ renderGeneric(await client.post(`/v1/agents/sessions/${encodeURIComponent(sessionId)}`, {
193841
193933
  text: opts.text
193842
193934
  }), opts, "Sent message");
193843
193935
  }
@@ -193845,7 +193937,7 @@ async function stopSession(sessionId, opts) {
193845
193937
  if (!(opts.yes || process.stdin.isTTY))
193846
193938
  throw new Error("Pass --yes to stop in non-interactive mode");
193847
193939
  const client = buildClient(opts);
193848
- renderGeneric(await client.delete(`/api/v1/agents/sessions/${encodeURIComponent(sessionId)}`), opts, "Stopped session");
193940
+ renderGeneric(await client.delete(`/v1/agents/sessions/${encodeURIComponent(sessionId)}`), opts, "Stopped session");
193849
193941
  }
193850
193942
 
193851
193943
  // src/commands/runs.ts
@@ -194081,7 +194173,7 @@ function isWorkflowResult2(value) {
194081
194173
  }
194082
194174
  async function listResultArtifacts(client, executionId) {
194083
194175
  try {
194084
- const payload = await client.get(`/api/v1/runs/${encodeURIComponent(executionId)}/artifacts`);
194176
+ const payload = await client.get(`/v1/runs/${encodeURIComponent(executionId)}/artifacts`);
194085
194177
  return (payload.artifacts ?? []).filter((artifact) => typeof artifact.path === "string" && artifact.path.startsWith("output/") && typeof artifact.name === "string");
194086
194178
  } catch {
194087
194179
  return [];
@@ -194089,7 +194181,7 @@ async function listResultArtifacts(client, executionId) {
194089
194181
  }
194090
194182
  async function downloadRunArtifact(client, executionId, artifactPath) {
194091
194183
  const encodedPath = artifactPath.split("/").map(encodeURIComponent).join("/");
194092
- return client.getStream(`/api/v1/runs/${encodeURIComponent(executionId)}/artifacts/${encodedPath}`);
194184
+ return client.getStream(`/v1/runs/${encodeURIComponent(executionId)}/artifacts/${encodedPath}`);
194093
194185
  }
194094
194186
  function filenameFromContentDisposition(header) {
194095
194187
  if (!header)
@@ -194149,7 +194241,7 @@ async function writeExecutionArtifacts(client, exampleDir, payload) {
194149
194241
  if (typeof fileId !== "string")
194150
194242
  continue;
194151
194243
  try {
194152
- const res = await client.getStream(`/api/v1/files/${fileId}`);
194244
+ const res = await client.getStream(`/v1/files/${fileId}/content`);
194153
194245
  const disposition = res.headers.get("Content-Disposition");
194154
194246
  const filename = filenameFromContentDisposition(disposition) ?? fileId;
194155
194247
  const safe = safeFilename(filename, `file-${i5}${filename.includes(".") ? "" : ".bin"}`);
@@ -194310,13 +194402,13 @@ function runOutput(run) {
194310
194402
  return run.output !== undefined ? run.output : run.result?.output;
194311
194403
  }
194312
194404
  async function fetchHasEvaluators(client, workflowId) {
194313
- const cfg = await client.get(`/api/v1/automations/${workflowId}/evaluators`);
194405
+ const cfg = await client.get(`/v1/automations/${workflowId}/evaluators`);
194314
194406
  return Array.isArray(cfg.config?.evaluators) && cfg.config.evaluators.length > 0;
194315
194407
  }
194316
194408
  async function resolveExample(client, workflowId, name) {
194317
194409
  let offset = 0;
194318
194410
  for (;; ) {
194319
- const page = await client.get(`/api/v1/automations/${workflowId}/examples`, {
194411
+ const page = await client.get(`/v1/automations/${workflowId}/examples`, {
194320
194412
  limit: String(EXAMPLE_PAGE_SIZE),
194321
194413
  offset: String(offset)
194322
194414
  });
@@ -194331,7 +194423,7 @@ async function resolveExample(client, workflowId, name) {
194331
194423
  }
194332
194424
  async function pollRunTerminal(client, runId) {
194333
194425
  const start = Date.now();
194334
- const base = `/api/v1/runs/${encodeURIComponent(runId)}`;
194426
+ const base = `/v1/runs/${encodeURIComponent(runId)}`;
194335
194427
  for (;; ) {
194336
194428
  const run = await client.get(base);
194337
194429
  const status = run.execution?.status ?? run.status;
@@ -194347,7 +194439,7 @@ async function pollRunTerminal(client, runId) {
194347
194439
  async function pollEvalRollup(client, runId) {
194348
194440
  const start = Date.now();
194349
194441
  for (;; ) {
194350
- const run = await client.get(`/api/v1/runs/${encodeURIComponent(runId)}`);
194442
+ const run = await client.get(`/v1/runs/${encodeURIComponent(runId)}`);
194351
194443
  if (run.eval && run.eval.passed != null) {
194352
194444
  return { score: run.eval.score ?? null, passed: run.eval.passed };
194353
194445
  }
@@ -194357,7 +194449,7 @@ async function pollEvalRollup(client, runId) {
194357
194449
  }
194358
194450
  }
194359
194451
  async function fetchEvalRows(client, workflowId, batchId, runId) {
194360
- const detail = await client.get(`/api/v1/automations/${workflowId}/experiments/${batchId}`);
194452
+ const detail = await client.get(`/v1/automations/${workflowId}/experiments/${batchId}`);
194361
194453
  return detail.resultsByRun?.[runId] ?? [];
194362
194454
  }
194363
194455
  function toArtifactPayload(run, runId) {
@@ -194386,7 +194478,7 @@ async function runWorkflowExamplesWithEval(client, dir, workflowIdOrSlug, workfl
194386
194478
  if (!example) {
194387
194479
  throw new Error(`example "${name}" not found in the server dataset for ${workflowId}. ` + `Push it first: eigenpal workflow dataset push ${workflowId}`);
194388
194480
  }
194389
- const started = await client.post(`/api/v1/automations/${workflowId}/examples/${example.id}/run`, {});
194481
+ const started = await client.post(`/v1/automations/${workflowId}/examples/${example.id}/run`, {});
194390
194482
  const runId = started.id;
194391
194483
  if (typeof runId !== "string")
194392
194484
  throw new Error("Example run did not return a run id");
@@ -194583,7 +194675,7 @@ function registerRunExpectedCommands(runs) {
194583
194675
  }
194584
194676
  async function runExample(agentId, opts) {
194585
194677
  const client = buildClient(opts);
194586
- const started = await client.post(`/api/v1/automations/${encodeURIComponent(agentAutomationId(agentId))}/experiments`, {
194678
+ const started = await client.post(`/v1/automations/${encodeURIComponent(agentAutomationId(agentId))}/experiments`, {
194587
194679
  examples: [opts.example],
194588
194680
  ...opts.sourceRef ? { sourceRef: opts.sourceRef } : {}
194589
194681
  });
@@ -194598,7 +194690,7 @@ async function runExample(agentId, opts) {
194598
194690
  if (status === "completed") {
194599
194691
  wait = await waitForExampleEvalRollup(client, agentId, runId);
194600
194692
  if (wait.kind === "landed") {
194601
- payload2 = await client.get(`/api/v1/runs/${encodeURIComponent(runId)}?expand=usage,execution`);
194693
+ payload2 = await client.get(`/v1/runs/${encodeURIComponent(runId)}?expand=usage,execution`);
194602
194694
  }
194603
194695
  }
194604
194696
  renderRunPayload(payload2, opts);
@@ -194713,7 +194805,7 @@ function projectionIncludeSource(opts) {
194713
194805
  }
194714
194806
  async function getRun(executionId, opts) {
194715
194807
  const client = buildClient(opts);
194716
- const run = toLegacyRunView(await client.get(`/api/v1/runs/${encodeURIComponent(executionId)}`, {
194808
+ const run = toLegacyRunView(await client.get(`/v1/runs/${encodeURIComponent(executionId)}`, {
194717
194809
  expand: serverExpandParam({ expand: opts.expand, include: opts.include })
194718
194810
  }));
194719
194811
  if (opts.step && !isWorkflowRun(run)) {
@@ -194920,7 +195012,7 @@ async function rerunRun(executionId, opts) {
194920
195012
  params.set("version", version2);
194921
195013
  }
194922
195014
  const query = params.toString();
194923
- const path16 = `/api/v1/runs/${encodeURIComponent(executionId)}/rerun${query ? `?${query}` : ""}`;
195015
+ const path16 = `/v1/runs/${encodeURIComponent(executionId)}/rerun${query ? `?${query}` : ""}`;
194924
195016
  let payload = await client.post(path16);
194925
195017
  const rerunId = String(payload.id ?? "");
194926
195018
  if (opts.wait && rerunId) {
@@ -194938,14 +195030,14 @@ async function promoteRun(executionId, opts) {
194938
195030
  const body = {};
194939
195031
  if (opts.name)
194940
195032
  body.name = opts.name;
194941
- const payload = await client.post(`/api/v1/runs/${encodeURIComponent(executionId)}/promote`, body);
195033
+ const payload = await client.post(`/v1/runs/${encodeURIComponent(executionId)}/promote`, body);
194942
195034
  if (opts.json)
194943
195035
  return printJson(payload);
194944
195036
  success2(`Promoted ${executionId} to example ${ui.bold(payload.name ?? payload.exampleId ?? "")}` + `${payload.automationId ? ` on ${payload.automationType ?? ""} ${payload.automationId}`.trimEnd() : ""}`);
194945
195037
  }
194946
195038
  async function fetchRunArtifacts(executionId, opts) {
194947
195039
  const client = buildClient(opts);
194948
- const baseRun = toLegacyRunView(await client.get(`/api/v1/runs/${encodeURIComponent(executionId)}`, {
195040
+ const baseRun = toLegacyRunView(await client.get(`/v1/runs/${encodeURIComponent(executionId)}`, {
194949
195041
  expand: "input,execution"
194950
195042
  }));
194951
195043
  const run = await attachListedArtifacts(client, executionId, baseRun);
@@ -194994,7 +195086,7 @@ async function listRunArtifacts(executionId, opts) {
194994
195086
  ]));
194995
195087
  }
194996
195088
  async function listCanonicalRunArtifacts(client, executionId) {
194997
- const payload = await client.get(`/api/v1/runs/${encodeURIComponent(executionId)}/artifacts`);
195089
+ const payload = await client.get(`/v1/runs/${encodeURIComponent(executionId)}/artifacts`);
194998
195090
  return (payload.artifacts ?? []).map((artifact) => {
194999
195091
  const name = String(artifact.name ?? "");
195000
195092
  const artifactPath = stringOrNull(artifact.path);
@@ -195064,7 +195156,7 @@ async function writeJsonRunArtifact(out, artifactPath, value) {
195064
195156
  await fs14.writeFile(path15.join(out, artifactPath), JSON.stringify(value, null, 2));
195065
195157
  }
195066
195158
  async function writeDownloadedRunArtifact(client, executionId, out, artifactPath) {
195067
- const response = await client.getStream(`/api/v1/runs/${encodeURIComponent(executionId)}/artifacts/${encodeRunArtifactPath(artifactPath)}`);
195159
+ const response = await client.getStream(`/v1/runs/${encodeURIComponent(executionId)}/artifacts/${encodeRunArtifactPath(artifactPath)}`);
195068
195160
  const outPath = path15.join(out, artifactPath);
195069
195161
  await fs14.mkdir(path15.dirname(outPath), { recursive: true });
195070
195162
  await fs14.writeFile(outPath, Buffer.from(await response.arrayBuffer()));
@@ -195112,11 +195204,11 @@ async function traceRun(executionId, opts) {
195112
195204
  }
195113
195205
  async function compareRun(referenceId, executionId, opts) {
195114
195206
  const client = buildClient(opts);
195115
- const target = toLegacyRunView(await client.get(`/api/v1/runs/${encodeURIComponent(executionId)}`, {
195207
+ const target = toLegacyRunView(await client.get(`/v1/runs/${encodeURIComponent(executionId)}`, {
195116
195208
  expand: "execution"
195117
195209
  }));
195118
195210
  const mode = opts.baseline ? "baseline" : "expected";
195119
- const reference = toLegacyRunView(await client.get(`/api/v1/runs/${encodeURIComponent(referenceId)}`, {
195211
+ const reference = toLegacyRunView(await client.get(`/v1/runs/${encodeURIComponent(referenceId)}`, {
195120
195212
  expand: "execution"
195121
195213
  }));
195122
195214
  if (isWorkflowRun(reference) && isWorkflowRun(target)) {
@@ -195261,7 +195353,7 @@ async function listRuns(source2, opts) {
195261
195353
  ...parsedAgentTarget ? { type: opts.type ?? "agent", source: parsedAgentTarget.slug } : resolvedWorkflowSource ? { source: resolvedWorkflowSource } : source2 ? { source: source2 } : {},
195262
195354
  ...parsedAgentTarget?.sourceRef ? { sourceRef: parsedAgentTarget.sourceRef } : {}
195263
195355
  };
195264
- const payload = await client.get("/api/v1/runs", params);
195356
+ const payload = await client.get("/v1/runs", params);
195265
195357
  const viewRuns = payload.runs.map(toLegacyRunView);
195266
195358
  const rows = opts.compact ? viewRuns.map(compactRunRow) : viewRuns;
195267
195359
  if (opts.json)
@@ -195327,7 +195419,7 @@ async function updateRunReview(executionId, opts) {
195327
195419
  body.correctedOutput = JSON.parse(opts.correctedJson);
195328
195420
  if (opts.clearCorrectedJson)
195329
195421
  body.correctedOutput = null;
195330
- const payload = await client.put(`/api/v1/runs/${encodeURIComponent(executionId)}/reviews`, body);
195422
+ const payload = await client.put(`/v1/runs/${encodeURIComponent(executionId)}/reviews`, body);
195331
195423
  renderGeneric(payload, opts, `Updated review for ${executionId}`);
195332
195424
  }
195333
195425
  async function closeRunReview(executionId, opts) {
@@ -195337,7 +195429,7 @@ async function closeRunReview(executionId, opts) {
195337
195429
  body.note = await fs14.readFile(opts.noteFile, "utf-8");
195338
195430
  if (opts.note !== undefined)
195339
195431
  body.note = opts.note;
195340
- const payload = await client.patch(`/api/v1/runs/${encodeURIComponent(executionId)}/reviews`, body);
195432
+ const payload = await client.patch(`/v1/runs/${encodeURIComponent(executionId)}/reviews`, body);
195341
195433
  renderGeneric(payload, opts, `Closed review for ${executionId}`);
195342
195434
  }
195343
195435
  function compactRunRow(run) {
@@ -195362,11 +195454,11 @@ async function clearRunReview(executionId, opts) {
195362
195454
  throw new Error("Clear cancelled");
195363
195455
  }
195364
195456
  const client = buildClient(opts);
195365
- const payload = await client.delete(`/api/v1/runs/${encodeURIComponent(executionId)}/reviews`);
195457
+ const payload = await client.delete(`/v1/runs/${encodeURIComponent(executionId)}/reviews`);
195366
195458
  renderGeneric(payload, opts, `Cleared review for ${executionId}`);
195367
195459
  }
195368
195460
  async function readRunExpected(client, executionId) {
195369
- const run = toLegacyRunView(await client.get(`/api/v1/runs/${encodeURIComponent(executionId)}`, {
195461
+ const run = toLegacyRunView(await client.get(`/v1/runs/${encodeURIComponent(executionId)}`, {
195370
195462
  expand: "execution"
195371
195463
  }));
195372
195464
  return {
@@ -195400,7 +195492,7 @@ async function downloadExpectedFiles(client, executionId, out, files) {
195400
195492
  const name = String(file2.name ?? "");
195401
195493
  if (!name || name.includes("/") || name.includes(".."))
195402
195494
  return null;
195403
- const response = await client.getStream(`/api/v1/runs/${encodeURIComponent(executionId)}/artifacts/expected/${encodeURIComponent(name)}`);
195495
+ const response = await client.getStream(`/v1/runs/${encodeURIComponent(executionId)}/artifacts/expected/${encodeURIComponent(name)}`);
195404
195496
  await fs14.mkdir(out, { recursive: true });
195405
195497
  await fs14.writeFile(path15.join(out, name), Buffer.from(await response.arrayBuffer()));
195406
195498
  return name;
@@ -195414,12 +195506,12 @@ async function uploadRunExpected(executionId, file2, opts) {
195414
195506
  form.append("file", new Blob([data]), path15.basename(file2));
195415
195507
  if (opts.name)
195416
195508
  form.append("name", opts.name);
195417
- const payload = await client.postFormData(`/api/v1/runs/${encodeURIComponent(executionId)}/reviews/expected`, form);
195509
+ const payload = await client.postFormData(`/v1/runs/${encodeURIComponent(executionId)}/reviews/expected`, form);
195418
195510
  renderGeneric(payload, opts, `Uploaded expected file for ${executionId}`);
195419
195511
  }
195420
195512
  async function copyOutputToExpected(executionId, outputFile, opts) {
195421
195513
  const client = buildClient(opts);
195422
- const payload = await client.post(`/api/v1/runs/${encodeURIComponent(executionId)}/reviews/expected`, {
195514
+ const payload = await client.post(`/v1/runs/${encodeURIComponent(executionId)}/reviews/expected`, {
195423
195515
  outputFileName: outputFile,
195424
195516
  ...opts.name ? { expectedName: opts.name } : {}
195425
195517
  });
@@ -195427,7 +195519,7 @@ async function copyOutputToExpected(executionId, outputFile, opts) {
195427
195519
  }
195428
195520
  async function renameRunExpected(executionId, oldName, newName, opts) {
195429
195521
  const client = buildClient(opts);
195430
- const payload = await client.patch(`/api/v1/runs/${encodeURIComponent(executionId)}/reviews/expected/${encodeURIComponent(oldName)}`, { name: newName });
195522
+ const payload = await client.patch(`/v1/runs/${encodeURIComponent(executionId)}/reviews/expected/${encodeURIComponent(oldName)}`, { name: newName });
195431
195523
  renderGeneric(payload, opts, `Renamed expected file for ${executionId}`);
195432
195524
  }
195433
195525
  async function deleteRunExpected(executionId, name, opts) {
@@ -195435,7 +195527,7 @@ async function deleteRunExpected(executionId, name, opts) {
195435
195527
  throw new Error("Delete cancelled");
195436
195528
  }
195437
195529
  const client = buildClient(opts);
195438
- await client.delete(`/api/v1/runs/${encodeURIComponent(executionId)}/reviews/expected/${encodeURIComponent(name)}`);
195530
+ await client.delete(`/v1/runs/${encodeURIComponent(executionId)}/reviews/expected/${encodeURIComponent(name)}`);
195439
195531
  renderGeneric({ ok: true }, opts, `Deleted expected file ${name}`);
195440
195532
  }
195441
195533
  async function watchRunCommand(executionId, opts) {
@@ -195448,7 +195540,7 @@ async function watchRunCommand(executionId, opts) {
195448
195540
  }
195449
195541
  const result = await watchExecution({
195450
195542
  fetch: async () => {
195451
- const payload = await client.get(`/api/v1/runs/${encodeURIComponent(executionId)}`, {
195543
+ const payload = await client.get(`/v1/runs/${encodeURIComponent(executionId)}`, {
195452
195544
  expand: "execution"
195453
195545
  });
195454
195546
  return toExecutionSnapshot(toLegacyRunView(payload), executionId);
@@ -195471,11 +195563,11 @@ async function cancelRun(executionId, opts) {
195471
195563
  if (!(opts.yes || process.stdin.isTTY))
195472
195564
  throw new Error("Pass --yes to cancel in non-interactive mode");
195473
195565
  const client = buildClient(opts);
195474
- const payload = await client.post(`/api/v1/runs/${encodeURIComponent(executionId)}/cancel`, {});
195566
+ const payload = await client.post(`/v1/runs/${encodeURIComponent(executionId)}/cancel`, {});
195475
195567
  renderRunPayload(payload, opts);
195476
195568
  }
195477
195569
  async function downloadTraceText(client, executionId) {
195478
- const payload = await client.get(`/api/v1/runs/${encodeURIComponent(executionId)}/trace`);
195570
+ const payload = await client.get(`/v1/runs/${encodeURIComponent(executionId)}/trace`);
195479
195571
  const events = Array.isArray(payload?.events) ? payload.events : [];
195480
195572
  return events.map((event) => JSON.stringify(event)).join(`
195481
195573
  `) + (events.length > 0 ? `
@@ -195642,7 +195734,7 @@ async function compareMatchedFileText(client, left, right, out, matched, normali
195642
195734
  function runFileUrl(side, name) {
195643
195735
  const runId = encodeURIComponent(side.runId);
195644
195736
  const artifactPath = side.kind === "expected" ? `expected/${name}` : `output/${name}`;
195645
- return `/api/v1/runs/${runId}/artifacts/${encodeRunArtifactPath(artifactPath)}`;
195737
+ return `/v1/runs/${runId}/artifacts/${encodeRunArtifactPath(artifactPath)}`;
195646
195738
  }
195647
195739
  function encodeRunArtifactPath(artifactPath) {
195648
195740
  return artifactPath.split("/").map(encodeURIComponent).join("/");
@@ -195723,7 +195815,7 @@ function registerAgentCommands(program2) {
195723
195815
  }
195724
195816
  async function listAgents(opts) {
195725
195817
  const client = buildClient(opts);
195726
- const payload = await client.get("/api/v1/automations", {
195818
+ const payload = await client.get("/v1/automations", {
195727
195819
  ...compactParams(opts),
195728
195820
  type: "agent"
195729
195821
  });
@@ -195922,7 +196014,7 @@ async function authLogin(flagBaseUrl) {
195922
196014
  s5.start("Validating key with the server");
195923
196015
  let authCheck;
195924
196016
  try {
195925
- authCheck = await client.get("/api/v1/auth/check");
196017
+ authCheck = await client.get("/v1/auth/check");
195926
196018
  } catch (err2) {
195927
196019
  s5.error("API key validation failed");
195928
196020
  error51(err2 instanceof Error ? err2.message : String(err2));
@@ -196359,6 +196451,106 @@ init_src();
196359
196451
  // src/commands/run-form-data.ts
196360
196452
  import { promises as fs15 } from "node:fs";
196361
196453
  import path18 from "node:path";
196454
+
196455
+ // src/lib/upload-limits.ts
196456
+ var DEFAULT_MULTIPART_MAX_BYTES = Math.floor(4.5 * 1024 * 1024);
196457
+ var MULTIPART_ENVELOPE_HEADROOM_BYTES = 256 * 1024;
196458
+ function multipartFileByteBudget(multipartMaxBytes = multipartMaxBytesFromEnv()) {
196459
+ if (multipartMaxBytes === null)
196460
+ return null;
196461
+ return Math.max(0, multipartMaxBytes - MULTIPART_ENVELOPE_HEADROOM_BYTES);
196462
+ }
196463
+ function indicesRequiringPreUpload(files, multipartMaxBytes = multipartMaxBytesFromEnv()) {
196464
+ const budget = multipartFileByteBudget(multipartMaxBytes);
196465
+ const toPreUpload = new Set;
196466
+ if (budget === null)
196467
+ return toPreUpload;
196468
+ files.forEach((file2, index) => {
196469
+ if (file2.size > budget) {
196470
+ toPreUpload.add(index);
196471
+ }
196472
+ });
196473
+ let multipartTotal = 0;
196474
+ files.forEach((file2, index) => {
196475
+ if (!toPreUpload.has(index))
196476
+ multipartTotal += file2.size;
196477
+ });
196478
+ const candidates = files.map((file2, index) => ({ file: file2, index })).filter(({ index }) => !toPreUpload.has(index)).slice().sort((a5, b8) => b8.file.size - a5.file.size || a5.index - b8.index);
196479
+ for (const { file: file2, index } of candidates) {
196480
+ if (multipartTotal <= budget)
196481
+ break;
196482
+ toPreUpload.add(index);
196483
+ multipartTotal -= file2.size;
196484
+ }
196485
+ return toPreUpload;
196486
+ }
196487
+ function multipartMaxBytesFromEnv(raw = env.EIGENPAL_MULTIPART_MAX_BYTES) {
196488
+ if (raw == null || raw.trim() === "")
196489
+ return DEFAULT_MULTIPART_MAX_BYTES;
196490
+ const normalized = raw.trim().toLowerCase();
196491
+ if (normalized === "none" || normalized === "null" || normalized === "unlimited")
196492
+ return null;
196493
+ const parsed = Number(normalized);
196494
+ if (Number.isSafeInteger(parsed) && parsed >= 0)
196495
+ return parsed;
196496
+ throw new Error("EIGENPAL_MULTIPART_MAX_BYTES must be a non-negative integer or one of: none, null, unlimited.");
196497
+ }
196498
+
196499
+ // src/lib/upload-reusable-file.ts
196500
+ import { randomUUID } from "node:crypto";
196501
+
196502
+ // src/lib/api-paths.ts
196503
+ var API_PREFIX = "/v1";
196504
+ function apiPath(suffix) {
196505
+ if (suffix === "/v1" || suffix.startsWith("/v1/"))
196506
+ return suffix;
196507
+ if (suffix === "/api/v1" || suffix.startsWith("/api/v1/")) {
196508
+ return `${API_PREFIX}${suffix.slice("/api/v1".length)}`;
196509
+ }
196510
+ const normalized = suffix.startsWith("/") ? suffix : `/${suffix}`;
196511
+ return `${API_PREFIX}${normalized}`;
196512
+ }
196513
+
196514
+ // src/lib/upload-reusable-file.ts
196515
+ function newIdempotencyKey() {
196516
+ return randomUUID();
196517
+ }
196518
+ async function uploadReusableFile(client, input) {
196519
+ const contentType = input.mimeType ?? guessMimeType(input.filename) ?? "application/octet-stream";
196520
+ const idempotencyKey = input.idempotencyKey ?? newIdempotencyKey();
196521
+ const negotiation = await client.post(apiPath("/files/uploads"), {
196522
+ filename: input.filename,
196523
+ contentType,
196524
+ size: input.content.byteLength,
196525
+ idempotencyKey,
196526
+ ...input.purpose ? { purpose: input.purpose } : {}
196527
+ });
196528
+ if (input.content.byteLength > negotiation.maxFileSizeBytes) {
196529
+ throw new Error(`File too large. Maximum size: ${Math.floor(negotiation.maxFileSizeBytes / (1024 * 1024))}MB`);
196530
+ }
196531
+ if (negotiation.transport === "multipart") {
196532
+ const form = new FormData;
196533
+ form.append("file", new Blob([input.content], { type: contentType }), input.filename);
196534
+ if (input.purpose)
196535
+ form.append("purpose", input.purpose);
196536
+ return await client.postFormData(negotiation.url, form);
196537
+ }
196538
+ const putHeaders = Object.fromEntries(Object.entries(negotiation.headers ?? {}).filter(([name]) => name.toLowerCase() !== "content-length"));
196539
+ const putResponse = await fetch(negotiation.url, {
196540
+ method: "PUT",
196541
+ headers: putHeaders,
196542
+ body: new Uint8Array(input.content)
196543
+ });
196544
+ if (!putResponse.ok) {
196545
+ await client.delete(apiPath(`/files/uploads/${negotiation.uploadId}`)).catch(() => {
196546
+ return;
196547
+ });
196548
+ throw new Error(`Storage upload failed (${putResponse.status}); retry the upload`);
196549
+ }
196550
+ return await client.post(apiPath(`/files/uploads/${negotiation.uploadId}/complete`), {});
196551
+ }
196552
+
196553
+ // src/commands/run-form-data.ts
196362
196554
  var RESERVED_FIELD_NAMES = new Set([
196363
196555
  "_json",
196364
196556
  "_metadata",
@@ -196368,25 +196560,82 @@ var RESERVED_FIELD_NAMES = new Set([
196368
196560
  "overrides",
196369
196561
  "metadata"
196370
196562
  ]);
196371
- async function buildRunFormData(input) {
196563
+ async function buildPreparedRunRequest(client, input) {
196564
+ const inputObj = {
196565
+ ...input.input ?? (input.inputJson ? JSON.parse(input.inputJson) : {})
196566
+ };
196567
+ const localFiles = [];
196568
+ for (const spec of parseInputFileSpecs(input.inputFile ?? [])) {
196569
+ const data = await fs15.readFile(spec.filePath);
196570
+ localFiles.push({
196571
+ fieldName: spec.fieldName,
196572
+ content: data,
196573
+ filename: path18.basename(spec.filePath),
196574
+ mimeType: guessMimeType(path18.basename(spec.filePath)) ?? "application/octet-stream"
196575
+ });
196576
+ }
196577
+ for (const file2 of input.files ?? []) {
196578
+ const content = Buffer.isBuffer(file2.content) ? file2.content : Buffer.from(file2.content);
196579
+ localFiles.push({
196580
+ fieldName: file2.fieldName,
196581
+ content,
196582
+ filename: file2.filename,
196583
+ mimeType: file2.mimeType ?? guessMimeType(file2.filename) ?? "application/octet-stream"
196584
+ });
196585
+ }
196586
+ const preUploadIndices = indicesRequiringPreUpload(localFiles.map((file2) => ({ size: file2.content.byteLength })));
196587
+ upgradeMixedFieldPreUpload(localFiles, preUploadIndices);
196588
+ const preUploadRefsByField = new Map;
196589
+ const preUploadIdempotencyKeys = localFiles.map(() => newIdempotencyKey());
196590
+ for (let index = 0;index < localFiles.length; index++) {
196591
+ const file2 = localFiles[index];
196592
+ if (!preUploadIndices.has(index))
196593
+ continue;
196594
+ const uploaded = await uploadReusableFile(client, {
196595
+ content: file2.content,
196596
+ filename: file2.filename,
196597
+ mimeType: file2.mimeType,
196598
+ purpose: "run-input",
196599
+ idempotencyKey: preUploadIdempotencyKeys[index]
196600
+ });
196601
+ const refs = preUploadRefsByField.get(file2.fieldName) ?? [];
196602
+ refs.push({ $fileId: uploaded.id });
196603
+ preUploadRefsByField.set(file2.fieldName, refs);
196604
+ }
196605
+ for (const [fieldName, refs] of preUploadRefsByField) {
196606
+ inputObj[fieldName] = refs.length === 1 ? refs[0] : refs;
196607
+ }
196608
+ const remaining = localFiles.filter((_9, index) => !preUploadIndices.has(index));
196372
196609
  const form = new FormData;
196373
196610
  form.append("target", input.target);
196374
- const inputObj = input.input ?? (input.inputJson ? JSON.parse(input.inputJson) : {});
196375
196611
  form.append("input", JSON.stringify(inputObj));
196376
- if (input.overrides) {
196612
+ if (input.overrides)
196377
196613
  form.append("overrides", JSON.stringify(input.overrides));
196378
- }
196379
- if (input.metadata) {
196614
+ if (input.metadata)
196380
196615
  form.append("metadata", JSON.stringify(input.metadata));
196616
+ for (const file2 of remaining) {
196617
+ appendFilePart(form, file2.fieldName, file2.content, file2.filename, file2.mimeType);
196381
196618
  }
196382
- for (const spec of parseInputFileSpecs(input.inputFile ?? [])) {
196383
- const data = await fs15.readFile(spec.filePath);
196384
- appendFilePart(form, spec.fieldName, data, path18.basename(spec.filePath));
196619
+ return { form, hasMultipartFiles: remaining.length > 0 };
196620
+ }
196621
+ function upgradeMixedFieldPreUpload(localFiles, preUploadIndices) {
196622
+ const fieldHasPreUpload = new Set;
196623
+ const fieldHasMultipart = new Set;
196624
+ for (let index = 0;index < localFiles.length; index++) {
196625
+ const { fieldName } = localFiles[index];
196626
+ if (preUploadIndices.has(index))
196627
+ fieldHasPreUpload.add(fieldName);
196628
+ else
196629
+ fieldHasMultipart.add(fieldName);
196385
196630
  }
196386
- for (const file2 of input.files ?? []) {
196387
- appendFilePart(form, file2.fieldName, file2.content, file2.filename, file2.mimeType);
196631
+ for (const fieldName of fieldHasPreUpload) {
196632
+ if (!fieldHasMultipart.has(fieldName))
196633
+ continue;
196634
+ for (let index = 0;index < localFiles.length; index++) {
196635
+ if (localFiles[index].fieldName === fieldName)
196636
+ preUploadIndices.add(index);
196637
+ }
196388
196638
  }
196389
- return form;
196390
196639
  }
196391
196640
  function appendFilePart(form, fieldName, content, filename, mimeType) {
196392
196641
  assertValidFileFieldName(fieldName);
@@ -196488,7 +196737,7 @@ async function runSavedWorkflowExamples(workflow2, examples, opts) {
196488
196737
 
196489
196738
  // src/commands/run.ts
196490
196739
  function registerRunCommands(program2) {
196491
- addJsonFlag(withBaseUrl(program2.command("run <target>"))).description("Start a workflow or agent run, e.g. workflows.extract-invoice.").option("--input-json <json>", "JSON input object").option("--input-file <field=path>", 'Input file to upload as multipart form-data. Repeat for multiple files; bare paths use field "file".', collectRepeated, []).option("--example <name>", "Run one persisted example by name").option("--dir <dir>", "Local eigenpal directory for workflow examples", undefined).option("--fail-on-mismatch", "For --example runs, exit non-zero when a graded example fails (evaluator fail, or output mismatch)").option("--wait", "Poll until the run reaches a terminal status").option("--interval <seconds>", "Polling interval in seconds", intArg, 2).option("--max-wait <seconds>", "Maximum wait before exit code 2", intArg, 1800).action(action(runTarget)).addHelpText("after", `
196740
+ addJsonFlag(withBaseUrl(program2.command("run <target>"))).description("Start a workflow or agent run, e.g. workflows.extract-invoice.").option("--input-json <json>", "JSON input object").option("--input-file <field=path>", 'Input file to upload. Files exceeding EIGENPAL_MULTIPART_MAX_BYTES (default 4.5 MiB; "none" disables) are pre-uploaded; smaller files stay on multipart. Repeat for multiple files; bare paths use field "file".', collectRepeated, []).option("--example <name>", "Run one persisted example by name").option("--dir <dir>", "Local eigenpal directory for workflow examples", undefined).option("--fail-on-mismatch", "For --example runs, exit non-zero when a graded example fails (evaluator fail, or output mismatch)").option("--wait", "Poll until the run reaches a terminal status").option("--interval <seconds>", "Polling interval in seconds", intArg, 2).option("--max-wait <seconds>", "Maximum wait before exit code 2", intArg, 1800).action(action(runTarget)).addHelpText("after", `
196492
196741
  Grading --example runs
196493
196742
  --example runs the SERVER's stored dataset example for the target — workflows
196494
196743
  (workflows.<slug>) and agents (agents.<slug>) alike — so push your latest
@@ -196536,12 +196785,17 @@ async function runTarget(target, opts) {
196536
196785
  const runPath = runTargetApiPath(target);
196537
196786
  const pathTarget = runStartMultipartTarget(target);
196538
196787
  if (opts.inputFile && opts.inputFile.length > 0) {
196539
- const form = await buildRunFormData({
196788
+ const prepared = await buildPreparedRunRequest(client, {
196540
196789
  target: pathTarget,
196541
196790
  inputFile: opts.inputFile,
196542
196791
  inputJson: opts.inputJson
196543
196792
  });
196544
- payload = await client.postFormData(runPath, form);
196793
+ if (prepared.hasMultipartFiles) {
196794
+ payload = await client.postFormData(runPath, prepared.form);
196795
+ } else {
196796
+ const input = JSON.parse(String(prepared.form.get("input") ?? "{}"));
196797
+ payload = await client.post(runPath, runStartJsonBody(target, input));
196798
+ }
196545
196799
  } else {
196546
196800
  payload = await client.post(runPath, runStartJsonBody(target, opts.inputJson ? JSON.parse(opts.inputJson) : {}));
196547
196801
  }
@@ -197095,7 +197349,7 @@ async function status(opts) {
197095
197349
  process.exit(1);
197096
197350
  }
197097
197351
  const client = new ApiClient(config2);
197098
- const auth = await fetchAuthOrNull(client, "/api/v1/auth/check");
197352
+ const auth = await fetchAuthOrNull(client, "/v1/auth/check");
197099
197353
  if (!auth || !auth.ok) {
197100
197354
  if (opts.json) {
197101
197355
  console.log(JSON.stringify({ authenticated: false, baseUrl: config2.baseUrl }, null, 2));
@@ -198465,7 +198719,7 @@ async function readDirAsZip2(dir) {
198465
198719
  return zipSync(tree);
198466
198720
  }
198467
198721
  function datasetExportPath(workflowId, exampleIds) {
198468
- const base = `/api/v1/automations/${workflowId}/dataset/export`;
198722
+ const base = `/v1/automations/${workflowId}/dataset/export`;
198469
198723
  if (!exampleIds || exampleIds.length === 0)
198470
198724
  return base;
198471
198725
  const query = exampleIds.map((id2) => encodeURIComponent(id2)).join(",");
@@ -198746,14 +199000,14 @@ function registerEvaluatorsCommands(parent) {
198746
199000
  const pullCmd = evaluators.command("pull <workflow-id>").description(descriptionFor("workflow_get_evaluators")).option("--out <path>", "Write YAML to file instead of stdout");
198747
199001
  withBaseUrl(pullCmd).action(action(async (workflow2, opts) => {
198748
199002
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
198749
- const result = await client.get(`/api/v1/automations/${workflowId}/evaluators`);
199003
+ const result = await client.get(`/v1/automations/${workflowId}/evaluators`);
198750
199004
  await writeOrPrint(opts.out, result.yaml ?? "");
198751
199005
  }));
198752
199006
  const pushCmd = evaluators.command("push <workflow-id>").description(descriptionFor("workflow_set_evaluators")).requiredOption("--file <yaml>", "Path to evaluators YAML file");
198753
199007
  addJsonFlag(withBaseUrl(pushCmd)).action(action(async (workflow2, opts) => {
198754
199008
  const yaml = await fs17.readFile(opts.file, "utf8");
198755
199009
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
198756
- const result = await client.put(`/api/v1/automations/${workflowId}/evaluators`, {
199010
+ const result = await client.put(`/v1/automations/${workflowId}/evaluators`, {
198757
199011
  yaml
198758
199012
  });
198759
199013
  if (opts.json) {
@@ -198775,7 +199029,7 @@ function registerDatasetCommands2(parent) {
198775
199029
  const listCmd = dataset.command("list <workflow-id>").description(descriptionFor("workflow_list_examples"));
198776
199030
  addJsonFlag(withBaseUrl(withPagination(listCmd, 100))).action(action(async (workflow2, opts) => {
198777
199031
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
198778
- const raw = await client.get(`/api/v1/automations/${workflowId}/examples`, {
199032
+ const raw = await client.get(`/v1/automations/${workflowId}/examples`, {
198779
199033
  limit: String(opts.limit),
198780
199034
  offset: String(opts.offset)
198781
199035
  });
@@ -198842,7 +199096,7 @@ skip in CI). Folder layout reference: \`packages/cli/src/skill/reference/dataset
198842
199096
  const formData = new FormData;
198843
199097
  formData.append("file", new Blob([data]), filename);
198844
199098
  formData.append("mode", opts.mode);
198845
- const res = await postMultipart(client, `/api/v1/automations/${workflowId}/dataset/import`, formData);
199099
+ const res = await postMultipart(client, `/v1/automations/${workflowId}/dataset/import`, formData);
198846
199100
  const text = await res.text();
198847
199101
  let terminal;
198848
199102
  try {
@@ -198963,7 +199217,7 @@ exclusive. To attach files without a dataset folder, pass ingress refs in JSON:
198963
199217
  if (opts.annotation !== undefined)
198964
199218
  body.annotation = opts.annotation;
198965
199219
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
198966
- const result = await client.post(`/api/v1/automations/${workflowId}/examples`, body);
199220
+ const result = await client.post(`/v1/automations/${workflowId}/examples`, body);
198967
199221
  if (opts.json) {
198968
199222
  printJson2(result);
198969
199223
  return;
@@ -198989,7 +199243,7 @@ exclusive. To attach files without a dataset folder, pass ingress refs in JSON:
198989
199243
  throw new Error("example update: pass at least one field to update");
198990
199244
  }
198991
199245
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
198992
- const result = await client.patch(`/api/v1/automations/${workflowId}/examples/${encodeURIComponent(exampleId)}`, body);
199246
+ const result = await client.patch(`/v1/automations/${workflowId}/examples/${encodeURIComponent(exampleId)}`, body);
198993
199247
  if (opts.json) {
198994
199248
  printJson2(result);
198995
199249
  return;
@@ -199003,7 +199257,7 @@ exclusive. To attach files without a dataset folder, pass ingress refs in JSON:
199003
199257
  throw new Error("example delete is destructive and requires --yes when run non-interactively");
199004
199258
  }
199005
199259
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
199006
- const deleted = await client.delete(`/api/v1/automations/${workflowId}/examples/${encodeURIComponent(exampleId)}`);
199260
+ const deleted = await client.delete(`/v1/automations/${workflowId}/examples/${encodeURIComponent(exampleId)}`);
199007
199261
  if (opts.json) {
199008
199262
  printJson2(deleted);
199009
199263
  return;
@@ -199013,7 +199267,7 @@ exclusive. To attach files without a dataset folder, pass ingress refs in JSON:
199013
199267
  const getCmd = example.command("get <workflow-id> <exampleId>").description("Fetch one eval example with full triggerInput, expectedOutput, and metadata.");
199014
199268
  addJsonFlag(withBaseUrl(getCmd)).action(action(async (workflow2, exampleId, opts) => {
199015
199269
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
199016
- const row = await client.get(`/api/v1/automations/${workflowId}/examples/${encodeURIComponent(exampleId)}`);
199270
+ const row = await client.get(`/v1/automations/${workflowId}/examples/${encodeURIComponent(exampleId)}`);
199017
199271
  if (opts.json) {
199018
199272
  printJson2(row);
199019
199273
  return;
@@ -199051,7 +199305,7 @@ async function resolveExampleIds(client, workflowId, raw) {
199051
199305
  const bySlug = new Map;
199052
199306
  let offset = 0;
199053
199307
  while (true) {
199054
- const list = await client.get(`/api/v1/automations/${workflowId}/examples`, {
199308
+ const list = await client.get(`/v1/automations/${workflowId}/examples`, {
199055
199309
  limit: String(PAGE_SIZE),
199056
199310
  offset: String(offset)
199057
199311
  });
@@ -199091,7 +199345,7 @@ function registerExperimentCommands2(parent) {
199091
199345
  };
199092
199346
  if (opts.batchId)
199093
199347
  params.batchId = opts.batchId;
199094
- const raw = await client.get(`/api/v1/automations/${workflowId}/experiments`, params);
199348
+ const raw = await client.get(`/v1/automations/${workflowId}/experiments`, params);
199095
199349
  renderListResult(raw, [
199096
199350
  { key: "id", header: "experiment" },
199097
199351
  { key: "status", header: "status" },
@@ -199133,7 +199387,7 @@ returns immediately with \`{ batchId, total }\`; poll
199133
199387
  addJsonFlag(withBaseUrl(runCmd)).action(action(async (workflow2, opts) => {
199134
199388
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
199135
199389
  const examples = opts.exampleId.length > 0 ? await resolveExampleIds(client, workflowId, opts.exampleId) : undefined;
199136
- const start = await client.post(`/api/v1/automations/${workflowId}/experiments`, {
199390
+ const start = await client.post(`/v1/automations/${workflowId}/experiments`, {
199137
199391
  examples
199138
199392
  });
199139
199393
  const experimentId = start.id ?? start.batchId;
@@ -199152,7 +199406,7 @@ returns immediately with \`{ batchId, total }\`; poll
199152
199406
  }
199153
199407
  const intervalMs = Math.max(1, opts.interval) * 1000;
199154
199408
  while (true) {
199155
- const status2 = await client.get(`/api/v1/automations/${workflowId}/experiments/${experimentId}`);
199409
+ const status2 = await client.get(`/v1/automations/${workflowId}/experiments/${experimentId}`);
199156
199410
  if (status2.status === "completed") {
199157
199411
  printJson2(status2);
199158
199412
  if (typeof status2.passRate === "number" && status2.passRate < 1 || typeof status2.failedCount === "number" && status2.failedCount > 0)
@@ -199172,7 +199426,7 @@ returns immediately with \`{ batchId, total }\`; poll
199172
199426
  const includes = new Set((opts.include ?? "").split(",").map((s5) => s5.trim()).filter(Boolean));
199173
199427
  const includePayload = includes.has("payload");
199174
199428
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
199175
- const url3 = `/api/v1/automations/${workflowId}/experiments/${batchId}`;
199429
+ const url3 = `/v1/automations/${workflowId}/experiments/${batchId}`;
199176
199430
  if (!opts.watch) {
199177
199431
  let result = {};
199178
199432
  let execs = [];
@@ -199254,7 +199508,7 @@ Behavior:
199254
199508
  process.exit(2);
199255
199509
  }
199256
199510
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
199257
- const result = await client.post(`/api/v1/automations/${workflowId}/experiments/${batchId}/cancel`);
199511
+ const result = await client.post(`/v1/automations/${workflowId}/experiments/${batchId}/cancel`);
199258
199512
  if (opts.json) {
199259
199513
  printJson2(result);
199260
199514
  return;
@@ -199281,7 +199535,7 @@ Behavior:
199281
199535
  withBaseUrl(resultsCmd).action(action(async (workflow2, batchId, opts) => {
199282
199536
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
199283
199537
  const params = new URLSearchParams({ format: opts.format });
199284
- const exportPath = batchId ? `/api/v1/automations/${workflowId}/experiments/${batchId}/export?${params.toString()}` : `/api/v1/automations/${workflowId}/experiments/export?${params.toString()}`;
199538
+ const exportPath = batchId ? `/v1/automations/${workflowId}/experiments/${batchId}/export?${params.toString()}` : `/v1/automations/${workflowId}/experiments/export?${params.toString()}`;
199285
199539
  await downloadStreamToFile2(client, exportPath, opts.out);
199286
199540
  }));
199287
199541
  const compareCmd = experiment.command("compare <batchIdA> <batchIdB>").description("Diff eval scores between two experiment batches.").option("--sort <abs-delta-desc|delta-asc|delta-desc|name>", "Row sort order (default: biggest movers first)", "abs-delta-desc").option("--regression-threshold <n>", "Δ below this is flagged as a regression (default 0.05)", Number.parseFloat, 0.05).addHelpText("after", `
@@ -199351,7 +199605,7 @@ Behavior:
199351
199605
  process.exit(2);
199352
199606
  }
199353
199607
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
199354
- const url3 = `/api/v1/automations/${workflowId}/experiments/${batchId}`;
199608
+ const url3 = `/v1/automations/${workflowId}/experiments/${batchId}`;
199355
199609
  const dest = opts.pull ? opts.pullOnComplete ?? `./results-${batchId}.${opts.format}` : null;
199356
199610
  if (dest) {
199357
199611
  const dir = path19.dirname(dest);
@@ -199370,7 +199624,7 @@ Behavior:
199370
199624
  return;
199371
199625
  const params = new URLSearchParams({ format: opts.format });
199372
199626
  try {
199373
- await downloadStreamToFile2(client, `/api/v1/automations/${workflowId}/experiments/${batchId}/export?${params.toString()}`, dest);
199627
+ await downloadStreamToFile2(client, `/v1/automations/${workflowId}/experiments/${batchId}/export?${params.toString()}`, dest);
199374
199628
  } catch (err2) {
199375
199629
  error51(`Watch finished but pulling results failed: ${err2 instanceof Error ? err2.message : String(err2)}. Re-run \`experiment results <wf> <batch>\` to retry.`);
199376
199630
  process.exit(1);