@eigenpal/cli 0.4.9 → 0.4.11

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
@@ -34,6 +34,7 @@
34
34
 
35
35
  ### Minor Changes
36
36
 
37
+ - c15ce88: Add the `eigenpal agent` command tree for managing agents, triggers, datasets, executions, experiments, and sessions from the terminal.
37
38
  - c82a215: `eigenpal auth login` now shows an interactive server picker when no `--base-url` flag or `EIGENPAL_BASE_URL` env is set:
38
39
  - **Cloud** (`https://studio.eigenpal.com`) is the default highlighted option.
39
40
  - Any on-prem URLs already in your credentials file are surfaced as separate options labelled with the profile names that use them — re-login against an existing on-prem deployment without retyping the URL.
@@ -211,6 +212,25 @@
211
212
 
212
213
  `@` path syntax (`--code @file.js`, `--inputs items=@arr.json`) matches `curl -d @file` / `gh --body-file -`. Bare paths and `-` (stdin) work too.
213
214
 
215
+ - 4137eb8: custom-script evaluator: the YAML now carries the entire
216
+ `function scoreScript(expected, actual) { ... }` declaration in a single
217
+ `function` field. Previous formats (`code`, then `body`) wrapped the
218
+ text implicitly; the new shape stores the function declaration verbatim
219
+ so the YAML matches the dashboard editor 1-for-1.
220
+
221
+ `workflow validate` and `workflow evaluators validate` flag YAML where
222
+ the function fails to parse, the signature does not match
223
+ `function scoreScript(expected, actual)` exactly, or the body contains
224
+ neither `return` nor `throw` — same checks the dashboard runs at form
225
+ save. The function must return a number in [0, 1]; throws are caught
226
+ and scored as 0.
227
+
228
+ Existing evaluator YAML must be ported by hand: rename `body` (or
229
+ `code`) to `function`, and add the `function scoreScript(expected,
230
+ actual) { ... }` declaration around your statements. Parameter order is
231
+ load-bearing — swapping `expected` and `actual` would silently invert
232
+ every score.
233
+
214
234
  - 3da0612: All list commands now support `--limit` / `--offset` pagination consistently.
215
235
  - CLI: `workflow execution list`, `workflow version list`, and `workflow step-type list` previously had no `--offset` (or no pagination at all). All six list commands now accept `--limit`/`--offset` with defaults of 50/0.
216
236
  - Server: `GET /api/workflows/:id/versions` now reads `?limit=` and `?offset=` query params (defaults 50/0; max limit 100). The `listVersions` repo method gained an optional `{ limit, offset }` argument.
@@ -233,6 +253,36 @@
233
253
  Document the CLI exit-code contract (0 = success, 1 = runtime error,
234
254
  2 = misuse / recoverable failure) in `packages/cli/CLAUDE.md`.
235
255
 
256
+ - 4b1f81c: `transform.script` now accepts a full function declaration via
257
+ `with.function:`, mirroring the custom-script evaluator. Parameter
258
+ names and order must equal `Object.keys(inputs)`:
259
+
260
+ ```yaml
261
+ - type: transform.script
262
+ with:
263
+ inputs:
264
+ items: '{{ steps.x.output }}'
265
+ taxRate: '{{ input.rate }}'
266
+ function: |
267
+ function script(items, taxRate) {
268
+ return items.length * taxRate;
269
+ }
270
+ ```
271
+
272
+ Authoring is now Monaco-backed in the dashboard, with input keys
273
+ surfaced as typed declarations so `items.` autocompletes against the
274
+ upstream step's output schema.
275
+
276
+ The legacy `with.code:` shape (a bare statement body, with input keys
277
+ leaking in as globals) still loads — the worker auto-wraps it via
278
+ `wrapBodyAsScriptFunction` at handler entry, and the dashboard
279
+ migrates `code:` to `function:` on the next save. New workflows
280
+ should use `function:`. The schema rejects:
281
+ - function names other than `script`
282
+ - parameter lists that don't match `Object.keys(inputs)` in order
283
+ - `async` / `import()` / `require()` (sandbox-incompatible)
284
+ - bodies with no `return` or `throw`
285
+
236
286
  - 3da0612: CLI: cleaner workflow command tree + matching `--json` shape.
237
287
 
238
288
  **Tree restructure** — the `workflow definition` namespace is gone. Its three verbs are core operations on the workflow itself, so they move up one level:
@@ -256,6 +306,7 @@
256
306
 
257
307
  ### Patch Changes
258
308
 
309
+ - c15ce88: Rename agent API calls to `/v1/agents` and scope execution helpers under their owning workflow or agent.
259
310
  - 71361fd: `auth login`: simplified flow. Removed the dead localhost-callback server (the
260
311
  dashboard never POSTed to it — every login fell through to copy-paste anyway).
261
312
  The browser now opens to `/developers/api-keys?from=cli` with a clearer prompt
@@ -283,6 +334,11 @@
283
334
 
284
335
  Interactive profiles are unchanged: when you log in via `eigenpal auth login`, the profile stores both apiKey and baseUrl, and every subsequent command derives baseUrl from that profile. Set `EIGENPAL_PROFILE=<name>` to switch profiles per-shell without modifying state.
285
336
 
337
+ - 542fe0e: CLI: surface evaluator entry-level fields (`name`, `description`, `weight`) so agents and humans can discover the optional `description` field on every evaluator.
338
+ - `workflow evaluator-type get <type>` now emits `entrySchema` alongside `configSchema`. Inspect with `eigenpal workflow evaluator-type get llm-judge | jq '.entrySchema'`.
339
+ - The skill reference now renders a "Common entry fields" table per type and a "Writing descriptions for stakeholders" section explaining the convention: each evaluator's `description` should be a one-sentence, plain-language summary aimed at non-technical reviewers in the dashboard.
340
+ - `init` templates `pdf-extraction` and `text-classification` now ship a `description:` line on their evaluator entries.
341
+
286
342
  - d41ee8b: CLI: fix `eigenpal status` error UX + harden `formatCliError` for real-world connection failures.
287
343
  - `eigenpal status` against an unreachable base URL no longer mis-diagnoses the failure as an auth problem. Previously, `EIGENPAL_BASE_URL=http://localhost:9999 eigenpal status` printed "Authentication check failed; try `eigenpal auth login`" — the wrong rabbit hole. The status command now rethrows non-auth errors (connection refused, DNS NXDOMAIN, timeout, HTML responses, 5xx) so `formatCliError` upstream can surface the right hint: `Could not connect to the server at <url> ... Set EIGENPAL_BASE_URL or pass --base-url <url>.` Only real 401/403 responses are treated as auth failures.
288
344
  - `formatCliError` now detects connection failures wrapped in any Error shape — bare `Error('ENOTFOUND ...')`, `Error` with `code: 'ECONNREFUSED'`, and `TypeError('fetch failed')` whose `.cause` carries the underlying error. Previously only `TypeError` whose message contained `fetch`/`URL` was recognized, so `getaddrinfo`-style errors fell through to the generic raw-message branch and lost the URL context.