@eigenpal/cli 0.20.98 → 0.20.99
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/CHANGELOG.md +9 -0
- package/dist/cli.js +34 -6
- package/dist/docs-bundle.json +23 -9
- package/dist/skill/reference/step-types.md +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @eigenpal/cli
|
|
2
2
|
|
|
3
|
+
## 0.20.99
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 996d1ef: Run responses expose structured errors with a machine-readable code, message,
|
|
8
|
+
retryability, and the configured business status code and step for workflow
|
|
9
|
+
rejections. Update consumers of the previous string error to read error.message.
|
|
10
|
+
HTTP success remains independent of the processing outcome.
|
|
11
|
+
|
|
3
12
|
## 0.20.94
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/cli.js
CHANGED
|
@@ -54998,7 +54998,7 @@ var init_step_configs = __esm(() => {
|
|
|
54998
54998
|
ControlHumanReviewOutputSchema = unknown().describe("The complete reviewed data in the same object or array shape as the input.");
|
|
54999
54999
|
ControlFailConfigSchema = object({
|
|
55000
55000
|
condition: string2().optional().describe("Optional LiquidJS expression. When set, the step only fails if this evaluates truthy; when omitted, it always fails when reached (compose with control.if for legacy gating)."),
|
|
55001
|
-
statusCode: number2().int().min(400).max(599).default(422).describe("
|
|
55001
|
+
statusCode: number2().int().min(400).max(599).default(422).describe("Business rejection code exposed as error.statusCode on the run. Does not change the API HTTP response status. Default 422 (Unprocessable Entity)."),
|
|
55002
55002
|
message: string2().min(1).describe('Human-readable failure message. Supports template expressions, e.g. "Document classified as {{ steps.classify.output.label }}".')
|
|
55003
55003
|
});
|
|
55004
55004
|
ControlFailOutputSchema = never().describe("control.fail never produces output — it terminates the workflow when triggered.");
|
|
@@ -57108,6 +57108,29 @@ var init_execution_tags = __esm(() => {
|
|
|
57108
57108
|
ExecutionTagsSchema = union([ExecutionTagSchema, array(ExecutionTagSchema).max(MAX_EXECUTION_TAGS)]).transform((tags) => [...new Set(typeof tags === "string" ? [tags] : tags)]);
|
|
57109
57109
|
});
|
|
57110
57110
|
|
|
57111
|
+
// ../types/src/run-error.ts
|
|
57112
|
+
function runErrorMessage(error) {
|
|
57113
|
+
if (typeof error === "string")
|
|
57114
|
+
return error;
|
|
57115
|
+
if (error && typeof error === "object" && "message" in error && typeof error.message === "string")
|
|
57116
|
+
return error.message;
|
|
57117
|
+
return null;
|
|
57118
|
+
}
|
|
57119
|
+
var RunErrorSchema;
|
|
57120
|
+
var init_run_error = __esm(() => {
|
|
57121
|
+
init_zod();
|
|
57122
|
+
RunErrorSchema = object({
|
|
57123
|
+
code: string2().describe("Machine-readable failure code. Do not branch on message text."),
|
|
57124
|
+
message: string2().describe("Human-readable failure explanation."),
|
|
57125
|
+
statusCode: number2().int().min(400).max(599).optional().describe("HTTP-style business code configured by control.fail, not the API response status. Absent for untyped failures."),
|
|
57126
|
+
step: string2().optional().describe("Name of the control.fail step that rejected the run, when known."),
|
|
57127
|
+
retryable: boolean2().describe("Whether another attempt might succeed. Does not schedule a retry.")
|
|
57128
|
+
}).meta({ id: "RunError" });
|
|
57129
|
+
});
|
|
57130
|
+
|
|
57131
|
+
// ../types/src/workflow/failure-contract.ts
|
|
57132
|
+
var init_failure_contract = () => {};
|
|
57133
|
+
|
|
57111
57134
|
// ../types/src/index.ts
|
|
57112
57135
|
var init_src = __esm(() => {
|
|
57113
57136
|
init_core3();
|
|
@@ -57119,6 +57142,7 @@ var init_src = __esm(() => {
|
|
|
57119
57142
|
init_execution_row();
|
|
57120
57143
|
init_run_expand();
|
|
57121
57144
|
init_execution_tags();
|
|
57145
|
+
init_run_error();
|
|
57122
57146
|
init_document_parser_v2();
|
|
57123
57147
|
init_parse_v2_migration();
|
|
57124
57148
|
init_validation();
|
|
@@ -57132,6 +57156,7 @@ var init_src = __esm(() => {
|
|
|
57132
57156
|
init_webhooks();
|
|
57133
57157
|
init_typed_script();
|
|
57134
57158
|
init_spreadsheet_evidence();
|
|
57159
|
+
init_failure_contract();
|
|
57135
57160
|
});
|
|
57136
57161
|
|
|
57137
57162
|
// node_modules/yaml/dist/nodes/identity.js
|
|
@@ -215600,7 +215625,7 @@ function toPutBody(body) {
|
|
|
215600
215625
|
// package.json
|
|
215601
215626
|
var package_default = {
|
|
215602
215627
|
name: "@eigenpal/cli",
|
|
215603
|
-
version: "0.20.
|
|
215628
|
+
version: "0.20.99",
|
|
215604
215629
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
215605
215630
|
keywords: [
|
|
215606
215631
|
"eigenpal",
|
|
@@ -249178,6 +249203,9 @@ function extractXlsxComparableText(filePath) {
|
|
|
249178
249203
|
}
|
|
249179
249204
|
}
|
|
249180
249205
|
|
|
249206
|
+
// src/commands/workflow/eval-example.ts
|
|
249207
|
+
init_src();
|
|
249208
|
+
|
|
249181
249209
|
// src/lib/execution-artifacts.ts
|
|
249182
249210
|
import { existsSync as existsSync11, mkdirSync as mkdirSync4, readdirSync as readdirSync3, readFileSync as readFileSync11, writeFileSync as writeFileSync6 } from "fs";
|
|
249183
249211
|
import { join as join5 } from "path";
|
|
@@ -249478,7 +249506,7 @@ function toArtifactPayload(run, runId) {
|
|
|
249478
249506
|
status: run.execution?.status ?? run.status ?? "unknown",
|
|
249479
249507
|
createdAt: run.timing?.createdAt ?? new Date().toISOString(),
|
|
249480
249508
|
completedAt: run.timing?.completedAt ?? null,
|
|
249481
|
-
error: run.error !== undefined ? run.error : run.result?.error
|
|
249509
|
+
error: runErrorMessage(run.error !== undefined ? run.error : run.result?.error),
|
|
249482
249510
|
output: runOutput(run),
|
|
249483
249511
|
stepExecutions: []
|
|
249484
249512
|
};
|
|
@@ -249516,7 +249544,7 @@ async function runWorkflowExamplesWithEval(client, dir, workflowIdOrSlug, workfl
|
|
|
249516
249544
|
exampleId: example.id,
|
|
249517
249545
|
executionId: runId,
|
|
249518
249546
|
run: runOk ? "ok" : "error",
|
|
249519
|
-
runError: runOk ? undefined : run.error ?? status ?? "unknown",
|
|
249547
|
+
runError: runOk ? undefined : runErrorMessage(run.error) ?? status ?? "unknown",
|
|
249520
249548
|
mode: "none"
|
|
249521
249549
|
};
|
|
249522
249550
|
const commit = run.source?.git?.commitSha;
|
|
@@ -249980,7 +250008,7 @@ function toLegacyRunView(run) {
|
|
|
249980
250008
|
return run;
|
|
249981
250009
|
const terminalOutput = run.output !== undefined ? run.output : result?.output;
|
|
249982
250010
|
const terminalFiles = run.files !== undefined ? run.files : result?.files ?? executionFiles?.output;
|
|
249983
|
-
const terminalError = run.error !== undefined ? run.error : result?.error;
|
|
250011
|
+
const terminalError = runErrorMessage(run.error !== undefined ? run.error : result?.error);
|
|
249984
250012
|
const terminalSchemaValid = execution?.schemaValid !== undefined ? execution.schemaValid : result?.schemaValid;
|
|
249985
250013
|
return {
|
|
249986
250014
|
...run,
|
|
@@ -250105,7 +250133,7 @@ function toExecutionSnapshot(run, fallbackId) {
|
|
|
250105
250133
|
error: typeof step.error === "string" ? step.error : null,
|
|
250106
250134
|
outputPreview: previewOutput(step.outputData)
|
|
250107
250135
|
})),
|
|
250108
|
-
error:
|
|
250136
|
+
error: runErrorMessage(run.error)
|
|
250109
250137
|
};
|
|
250110
250138
|
}
|
|
250111
250139
|
var PREVIEW_MAX = 120;
|