@eigenpal/cli 0.5.1 → 0.5.2
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 +4 -81
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -67182,72 +67182,6 @@ var init_workflow = __esm(() => {
|
|
|
67182
67182
|
});
|
|
67183
67183
|
});
|
|
67184
67184
|
|
|
67185
|
-
// ../types/src/workflow/eval-config.ts
|
|
67186
|
-
function parseEvalConfig(raw) {
|
|
67187
|
-
return EvalConfigSchema.parse(raw ?? {});
|
|
67188
|
-
}
|
|
67189
|
-
function parseEvalConfigForForm(raw) {
|
|
67190
|
-
return EvalConfigFormSchema.parse(raw ?? {});
|
|
67191
|
-
}
|
|
67192
|
-
function isValidJudgeModel(model) {
|
|
67193
|
-
return JUDGE_MODEL_IDS.includes(model);
|
|
67194
|
-
}
|
|
67195
|
-
function resolveConcurrency(value, defaultNum) {
|
|
67196
|
-
const clamp = (n) => Math.min(MAX_CONCURRENCY, Math.max(1, n));
|
|
67197
|
-
if (value == null) {
|
|
67198
|
-
const d2 = clamp(defaultNum);
|
|
67199
|
-
return { executions: d2, judge: d2 };
|
|
67200
|
-
}
|
|
67201
|
-
if (typeof value === "number") {
|
|
67202
|
-
const d2 = clamp(value);
|
|
67203
|
-
return { executions: d2, judge: d2 };
|
|
67204
|
-
}
|
|
67205
|
-
return {
|
|
67206
|
-
executions: clamp(value.executions ?? defaultNum),
|
|
67207
|
-
judge: clamp(value.judge ?? defaultNum)
|
|
67208
|
-
};
|
|
67209
|
-
}
|
|
67210
|
-
var JUDGE_MODEL_IDS, JudgeModelSchema, DEFAULT_JUDGE_MODEL = "gpt-5.2", DEFAULT_CONCURRENCY = 3, ConcurrencySchema, JudgeConfigSchema, JudgeConfigFormSchema, EvalConfigSchema, EvalConfigFormSchema, MAX_CONCURRENCY = 50, EVAL_CONFIG_FORM_KEYS, EVAL_CONFIG_FIELD_DEFINITIONS;
|
|
67211
|
-
var init_eval_config = __esm(() => {
|
|
67212
|
-
init_zod();
|
|
67213
|
-
JUDGE_MODEL_IDS = ["gpt-4o", "gpt-4o-mini", "gpt-5.2"];
|
|
67214
|
-
JudgeModelSchema = exports_external.enum(JUDGE_MODEL_IDS);
|
|
67215
|
-
ConcurrencySchema = exports_external.union([
|
|
67216
|
-
exports_external.number().int().min(1),
|
|
67217
|
-
exports_external.object({
|
|
67218
|
-
executions: exports_external.number().int().min(1),
|
|
67219
|
-
judge: exports_external.number().int().min(1)
|
|
67220
|
-
})
|
|
67221
|
-
]);
|
|
67222
|
-
JudgeConfigSchema = exports_external.object({
|
|
67223
|
-
prompt: exports_external.string().default(""),
|
|
67224
|
-
model: JudgeModelSchema.default(DEFAULT_JUDGE_MODEL),
|
|
67225
|
-
run: exports_external.boolean().default(true)
|
|
67226
|
-
});
|
|
67227
|
-
JudgeConfigFormSchema = exports_external.object({
|
|
67228
|
-
prompt: exports_external.string().default(""),
|
|
67229
|
-
model: exports_external.string().default(DEFAULT_JUDGE_MODEL),
|
|
67230
|
-
run: exports_external.boolean().default(true)
|
|
67231
|
-
});
|
|
67232
|
-
EvalConfigSchema = exports_external.object({
|
|
67233
|
-
concurrency: ConcurrencySchema.default(DEFAULT_CONCURRENCY),
|
|
67234
|
-
judge: JudgeConfigSchema.prefault({}),
|
|
67235
|
-
defaultOverrides: exports_external.array(exports_external.string()).default([])
|
|
67236
|
-
});
|
|
67237
|
-
EvalConfigFormSchema = exports_external.object({
|
|
67238
|
-
concurrency: ConcurrencySchema.default(DEFAULT_CONCURRENCY),
|
|
67239
|
-
judge: JudgeConfigFormSchema.prefault({}),
|
|
67240
|
-
defaultOverrides: exports_external.array(exports_external.string()).default([])
|
|
67241
|
-
});
|
|
67242
|
-
EVAL_CONFIG_FORM_KEYS = ["judge"];
|
|
67243
|
-
EVAL_CONFIG_FIELD_DEFINITIONS = {
|
|
67244
|
-
judge: {
|
|
67245
|
-
label: "AI review",
|
|
67246
|
-
description: "Optional automated check: an AI compares each run to the expected result using your instructions."
|
|
67247
|
-
}
|
|
67248
|
-
};
|
|
67249
|
-
});
|
|
67250
|
-
|
|
67251
67185
|
// ../types/src/workflow/expected-output.ts
|
|
67252
67186
|
var ExpectedDocumentRefSchema, ExpectedDocumentsValueSchema, ExpectedOutputSchema, ExpectedOutputFilesSchema;
|
|
67253
67187
|
var init_expected_output = __esm(() => {
|
|
@@ -67464,7 +67398,6 @@ var init_workflow2 = __esm(() => {
|
|
|
67464
67398
|
init_actions();
|
|
67465
67399
|
init_steps();
|
|
67466
67400
|
init_workflow();
|
|
67467
|
-
init_eval_config();
|
|
67468
67401
|
init_expected_output();
|
|
67469
67402
|
init_local_meta();
|
|
67470
67403
|
init_email_trigger();
|
|
@@ -68378,12 +68311,9 @@ __export(exports_src, {
|
|
|
68378
68311
|
runInputKey: () => runInputKey,
|
|
68379
68312
|
rootS3Path: () => rootS3Path,
|
|
68380
68313
|
resolveEffectiveMimeType: () => resolveEffectiveMimeType,
|
|
68381
|
-
resolveConcurrency: () => resolveConcurrency,
|
|
68382
68314
|
requiresSpecializedParser: () => requiresSpecializedParser,
|
|
68383
68315
|
parseStepType: () => parseStepType,
|
|
68384
68316
|
parseFileKey: () => parseFileKey,
|
|
68385
|
-
parseEvalConfigForForm: () => parseEvalConfigForForm,
|
|
68386
|
-
parseEvalConfig: () => parseEvalConfig,
|
|
68387
68317
|
noopTracingContext: () => noopTracingContext,
|
|
68388
68318
|
mapOCRAttributes: () => mapOCRAttributes,
|
|
68389
68319
|
mapLLMAttributes: () => mapLLMAttributes,
|
|
@@ -68393,7 +68323,6 @@ __export(exports_src, {
|
|
|
68393
68323
|
judgeScoreJson: () => judgeScoreJson,
|
|
68394
68324
|
judgeLabelJson: () => judgeLabelJson,
|
|
68395
68325
|
isWorkflowResult: () => isWorkflowResult,
|
|
68396
|
-
isValidJudgeModel: () => isValidJudgeModel,
|
|
68397
68326
|
isTerminalExecutionStatus: () => isTerminalExecutionStatus,
|
|
68398
68327
|
isStepCategory: () => isStepCategory,
|
|
68399
68328
|
isOutputSchemaUnknown: () => isOutputSchemaUnknown,
|
|
@@ -68546,10 +68475,8 @@ __export(exports_src, {
|
|
|
68546
68475
|
LayoutElementTypeSchema: () => LayoutElementTypeSchema,
|
|
68547
68476
|
LayoutElementSchema: () => LayoutElementSchema,
|
|
68548
68477
|
LLM_JUDGE_PROMPT_MIN_LENGTH: () => LLM_JUDGE_PROMPT_MIN_LENGTH,
|
|
68549
|
-
JudgeModelSchema: () => JudgeModelSchema,
|
|
68550
68478
|
JudgeModeSchema: () => JudgeModeSchema,
|
|
68551
68479
|
JsonSchemaSchema: () => JsonSchemaSchema,
|
|
68552
|
-
JUDGE_MODEL_IDS: () => JUDGE_MODEL_IDS,
|
|
68553
68480
|
IfStepSchema: () => IfStepSchema,
|
|
68554
68481
|
INPUT_KINDS: () => INPUT_KINDS,
|
|
68555
68482
|
ID_PREFIXES: () => ID_PREFIXES,
|
|
@@ -68582,7 +68509,6 @@ __export(exports_src, {
|
|
|
68582
68509
|
EvalOverridesSchema: () => EvalOverridesSchema,
|
|
68583
68510
|
EvalExampleMetaSchema: () => EvalExampleMetaSchema,
|
|
68584
68511
|
EvalConfigYamlSchema: () => EvalConfigYamlSchema,
|
|
68585
|
-
EvalConfigSchema: () => EvalConfigSchema,
|
|
68586
68512
|
EmailTriggerMethodSchema: () => EmailTriggerMethodSchema,
|
|
68587
68513
|
Eigenpal: () => Eigenpal,
|
|
68588
68514
|
EXECUTION_TYPES: () => EXECUTION_TYPES,
|
|
@@ -68596,8 +68522,6 @@ __export(exports_src, {
|
|
|
68596
68522
|
EXECUTION_AGENT_QUEUED_STATUSES: () => EXECUTION_AGENT_QUEUED_STATUSES,
|
|
68597
68523
|
EXECUTION_AGENT_METRICS_STATUSES: () => EXECUTION_AGENT_METRICS_STATUSES,
|
|
68598
68524
|
EXECUTION_AGENT_CANCEL_REQUESTABLE_STATUSES: () => EXECUTION_AGENT_CANCEL_REQUESTABLE_STATUSES,
|
|
68599
|
-
EVAL_CONFIG_FORM_KEYS: () => EVAL_CONFIG_FORM_KEYS,
|
|
68600
|
-
EVAL_CONFIG_FIELD_DEFINITIONS: () => EVAL_CONFIG_FIELD_DEFINITIONS,
|
|
68601
68525
|
ERROR_HINTS: () => ERROR_HINTS,
|
|
68602
68526
|
DocumentParserOutputSchema: () => DocumentParserOutputSchema,
|
|
68603
68527
|
DocumentParserInputSchema: () => DocumentParserInputSchema,
|
|
@@ -68610,7 +68534,6 @@ __export(exports_src, {
|
|
|
68610
68534
|
DURABLE_EXECUTION_TYPES: () => DURABLE_EXECUTION_TYPES,
|
|
68611
68535
|
DETERMINISTIC_TEMPERATURE: () => DETERMINISTIC_TEMPERATURE,
|
|
68612
68536
|
DEFAULT_PAGE_SIZE: () => DEFAULT_PAGE_SIZE,
|
|
68613
|
-
DEFAULT_CONCURRENCY: () => DEFAULT_CONCURRENCY,
|
|
68614
68537
|
DATASET_NAME_PATTERN: () => DATASET_NAME_PATTERN,
|
|
68615
68538
|
CustomScriptConfigSchema: () => CustomScriptConfigSchema,
|
|
68616
68539
|
CreateWorkflowDefinitionSchema: () => CreateWorkflowDefinitionSchema,
|
|
@@ -181229,7 +181152,7 @@ import { fileURLToPath as fileURLToPath6 } from "url";
|
|
|
181229
181152
|
// package.json
|
|
181230
181153
|
var package_default = {
|
|
181231
181154
|
name: "@eigenpal/cli",
|
|
181232
|
-
version: "0.5.
|
|
181155
|
+
version: "0.5.2",
|
|
181233
181156
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
181234
181157
|
keywords: [
|
|
181235
181158
|
"eigenpal",
|
|
@@ -185747,7 +185670,7 @@ function createProgressLines(options8) {
|
|
|
185747
185670
|
// src/commands/exec.ts
|
|
185748
185671
|
var POLL_INTERVAL_MS = 2000;
|
|
185749
185672
|
var MAX_POLL_MS = 5 * 60 * 1000;
|
|
185750
|
-
var
|
|
185673
|
+
var DEFAULT_CONCURRENCY = 3;
|
|
185751
185674
|
async function pollExecution2(client, executionId) {
|
|
185752
185675
|
const start = Date.now();
|
|
185753
185676
|
while (Date.now() - start < MAX_POLL_MS) {
|
|
@@ -185763,8 +185686,8 @@ async function runExec(client, dir, workflowIdOrSlug, exampleNames, options8 = {
|
|
|
185763
185686
|
const names = getExampleNames(dir, exampleNames.length ? exampleNames : undefined);
|
|
185764
185687
|
if (names.length === 0)
|
|
185765
185688
|
throw new Error("No matching eval examples found.");
|
|
185766
|
-
const requested = options8.concurrencyOverride ??
|
|
185767
|
-
const requestedValid = Number.isFinite(requested) && requested > 0 ? requested :
|
|
185689
|
+
const requested = options8.concurrencyOverride ?? DEFAULT_CONCURRENCY;
|
|
185690
|
+
const requestedValid = Number.isFinite(requested) && requested > 0 ? requested : DEFAULT_CONCURRENCY;
|
|
185768
185691
|
const concurrency = Math.max(1, Math.min(requestedValid, names.length));
|
|
185769
185692
|
const evalBaseDir = resolveEvalBaseDir(dir);
|
|
185770
185693
|
if (!evalBaseDir)
|