@eigenpal/cli 0.20.98 → 0.21.0

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @eigenpal/cli
2
2
 
3
+ ## 0.21.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 2f63149: The CLI service account guide explains how to preserve key access during rotation and who can revoke admin service account keys.
8
+
9
+ ## 0.20.99
10
+
11
+ ### Patch Changes
12
+
13
+ - 996d1ef: Run responses expose structured errors with a machine-readable code, message,
14
+ retryability, and the configured business status code and step for workflow
15
+ rejections. Update consumers of the previous string error to read error.message.
16
+ HTTP success remains independent of the processing outcome.
17
+
3
18
  ## 0.20.94
4
19
 
5
20
  ### Patch Changes
package/dist/cli.js CHANGED
@@ -7621,6 +7621,7 @@ var init_common = __esm(() => {
7621
7621
  TEMPLATE: "tmpl",
7622
7622
  TEMPLATE_REVISION: "tmpr",
7623
7623
  USER: "user",
7624
+ SERVICE_ACCOUNT: "svc",
7624
7625
  TENANT: "org",
7625
7626
  TENANT_INVITE: "inv",
7626
7627
  ORGANIZATION_CREATION: "orgc",
@@ -54998,7 +54999,7 @@ var init_step_configs = __esm(() => {
54998
54999
  ControlHumanReviewOutputSchema = unknown().describe("The complete reviewed data in the same object or array shape as the input.");
54999
55000
  ControlFailConfigSchema = object({
55000
55001
  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("HTTP-style status code returned to the caller (sync runs) and persisted on the execution. Default 422 (Unprocessable Entity)."),
55002
+ 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
55003
  message: string2().min(1).describe('Human-readable failure message. Supports template expressions, e.g. "Document classified as {{ steps.classify.output.label }}".')
55003
55004
  });
55004
55005
  ControlFailOutputSchema = never().describe("control.fail never produces output — it terminates the workflow when triggered.");
@@ -57108,6 +57109,29 @@ var init_execution_tags = __esm(() => {
57108
57109
  ExecutionTagsSchema = union([ExecutionTagSchema, array(ExecutionTagSchema).max(MAX_EXECUTION_TAGS)]).transform((tags) => [...new Set(typeof tags === "string" ? [tags] : tags)]);
57109
57110
  });
57110
57111
 
57112
+ // ../types/src/run-error.ts
57113
+ function runErrorMessage(error) {
57114
+ if (typeof error === "string")
57115
+ return error;
57116
+ if (error && typeof error === "object" && "message" in error && typeof error.message === "string")
57117
+ return error.message;
57118
+ return null;
57119
+ }
57120
+ var RunErrorSchema;
57121
+ var init_run_error = __esm(() => {
57122
+ init_zod();
57123
+ RunErrorSchema = object({
57124
+ code: string2().describe("Machine-readable failure code. Do not branch on message text."),
57125
+ message: string2().describe("Human-readable failure explanation."),
57126
+ 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."),
57127
+ step: string2().optional().describe("Name of the control.fail step that rejected the run, when known."),
57128
+ retryable: boolean2().describe("Whether another attempt might succeed. Does not schedule a retry.")
57129
+ }).meta({ id: "RunError" });
57130
+ });
57131
+
57132
+ // ../types/src/workflow/failure-contract.ts
57133
+ var init_failure_contract = () => {};
57134
+
57111
57135
  // ../types/src/index.ts
57112
57136
  var init_src = __esm(() => {
57113
57137
  init_core3();
@@ -57119,6 +57143,7 @@ var init_src = __esm(() => {
57119
57143
  init_execution_row();
57120
57144
  init_run_expand();
57121
57145
  init_execution_tags();
57146
+ init_run_error();
57122
57147
  init_document_parser_v2();
57123
57148
  init_parse_v2_migration();
57124
57149
  init_validation();
@@ -57132,6 +57157,7 @@ var init_src = __esm(() => {
57132
57157
  init_webhooks();
57133
57158
  init_typed_script();
57134
57159
  init_spreadsheet_evidence();
57160
+ init_failure_contract();
57135
57161
  });
57136
57162
 
57137
57163
  // node_modules/yaml/dist/nodes/identity.js
@@ -215600,7 +215626,7 @@ function toPutBody(body) {
215600
215626
  // package.json
215601
215627
  var package_default = {
215602
215628
  name: "@eigenpal/cli",
215603
- version: "0.20.98",
215629
+ version: "0.21.0",
215604
215630
  description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
215605
215631
  keywords: [
215606
215632
  "eigenpal",
@@ -249178,6 +249204,9 @@ function extractXlsxComparableText(filePath) {
249178
249204
  }
249179
249205
  }
249180
249206
 
249207
+ // src/commands/workflow/eval-example.ts
249208
+ init_src();
249209
+
249181
249210
  // src/lib/execution-artifacts.ts
249182
249211
  import { existsSync as existsSync11, mkdirSync as mkdirSync4, readdirSync as readdirSync3, readFileSync as readFileSync11, writeFileSync as writeFileSync6 } from "fs";
249183
249212
  import { join as join5 } from "path";
@@ -249478,7 +249507,7 @@ function toArtifactPayload(run, runId) {
249478
249507
  status: run.execution?.status ?? run.status ?? "unknown",
249479
249508
  createdAt: run.timing?.createdAt ?? new Date().toISOString(),
249480
249509
  completedAt: run.timing?.completedAt ?? null,
249481
- error: run.error !== undefined ? run.error : run.result?.error ?? null,
249510
+ error: runErrorMessage(run.error !== undefined ? run.error : run.result?.error),
249482
249511
  output: runOutput(run),
249483
249512
  stepExecutions: []
249484
249513
  };
@@ -249516,7 +249545,7 @@ async function runWorkflowExamplesWithEval(client, dir, workflowIdOrSlug, workfl
249516
249545
  exampleId: example.id,
249517
249546
  executionId: runId,
249518
249547
  run: runOk ? "ok" : "error",
249519
- runError: runOk ? undefined : run.error ?? status ?? "unknown",
249548
+ runError: runOk ? undefined : runErrorMessage(run.error) ?? status ?? "unknown",
249520
249549
  mode: "none"
249521
249550
  };
249522
249551
  const commit = run.source?.git?.commitSha;
@@ -249980,7 +250009,7 @@ function toLegacyRunView(run) {
249980
250009
  return run;
249981
250010
  const terminalOutput = run.output !== undefined ? run.output : result?.output;
249982
250011
  const terminalFiles = run.files !== undefined ? run.files : result?.files ?? executionFiles?.output;
249983
- const terminalError = run.error !== undefined ? run.error : result?.error;
250012
+ const terminalError = runErrorMessage(run.error !== undefined ? run.error : result?.error);
249984
250013
  const terminalSchemaValid = execution?.schemaValid !== undefined ? execution.schemaValid : result?.schemaValid;
249985
250014
  return {
249986
250015
  ...run,
@@ -250105,7 +250134,7 @@ function toExecutionSnapshot(run, fallbackId) {
250105
250134
  error: typeof step.error === "string" ? step.error : null,
250106
250135
  outputPreview: previewOutput(step.outputData)
250107
250136
  })),
250108
- error: typeof run.error === "string" ? run.error : null
250137
+ error: runErrorMessage(run.error)
250109
250138
  };
250110
250139
  }
250111
250140
  var PREVIEW_MAX = 120;