@eigenpal/cli 0.20.19 → 0.20.21
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,13 @@
|
|
|
1
1
|
# @eigenpal/cli
|
|
2
2
|
|
|
3
|
+
## 0.20.21
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7e2ebe0: Use `eigenpal runs list --tag <tag>` to find runs with an exact tag, such as a request ID.
|
|
8
|
+
|
|
9
|
+
Start an ad-hoc workflow or agent run with `eigenpal run <target> --tag <tag>`. Repeat `--tag` for multiple tags.
|
|
10
|
+
|
|
3
11
|
## 0.20.13
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cli.js
CHANGED
|
@@ -54900,6 +54900,7 @@ var init_step_configs = __esm(() => {
|
|
|
54900
54900
|
responseCharset: string2().describe("Charset used to decode the response body (e.g. utf-8, windows-1250)")
|
|
54901
54901
|
});
|
|
54902
54902
|
ActionInvokeWorkflowConfigSchema = object({
|
|
54903
|
+
tags: union([string2().min(1), array(string2().min(1)).max(100)]).optional().describe("Child mode only. One tag or a list. Supports templates resolving to a string or string array. Tags are not inherited."),
|
|
54903
54904
|
workflow: string2().min(1).optional().describe("Workflow to invoke — definition name or wf_ id (tenant-scoped)"),
|
|
54904
54905
|
workflowId: string2().min(1).optional().describe("Legacy alias for workflow when the value is a wf_ id"),
|
|
54905
54906
|
execution: _enum(["inline", "child"]).optional().describe("inline: run target steps in this execution (default). child: spawn a separate run with lineage."),
|
|
@@ -54926,6 +54927,12 @@ var init_step_configs = __esm(() => {
|
|
|
54926
54927
|
}
|
|
54927
54928
|
const mode = data.execution === "child" ? "child" : "inline";
|
|
54928
54929
|
if (mode === "inline") {
|
|
54930
|
+
if (data.tags !== undefined)
|
|
54931
|
+
ctx.addIssue({
|
|
54932
|
+
code: "custom",
|
|
54933
|
+
message: "tags are only supported with execution: child",
|
|
54934
|
+
path: ["tags"]
|
|
54935
|
+
});
|
|
54929
54936
|
if (data.wait === false) {
|
|
54930
54937
|
ctx.addIssue({
|
|
54931
54938
|
code: "custom",
|
|
@@ -56881,6 +56888,14 @@ var init_webhooks = __esm(() => {
|
|
|
56881
56888
|
});
|
|
56882
56889
|
});
|
|
56883
56890
|
|
|
56891
|
+
// ../types/src/execution-tags.ts
|
|
56892
|
+
var ExecutionTagSchema, ExecutionTagsSchema;
|
|
56893
|
+
var init_execution_tags = __esm(() => {
|
|
56894
|
+
init_zod();
|
|
56895
|
+
ExecutionTagSchema = string2().min(1).max(256).refine((tag) => tag.trim().length > 0, "Tags must not be blank");
|
|
56896
|
+
ExecutionTagsSchema = union([ExecutionTagSchema, array(ExecutionTagSchema).max(100)]).transform((tags) => [...new Set(typeof tags === "string" ? [tags] : tags)]);
|
|
56897
|
+
});
|
|
56898
|
+
|
|
56884
56899
|
// ../types/src/index.ts
|
|
56885
56900
|
var init_src = __esm(() => {
|
|
56886
56901
|
init_core3();
|
|
@@ -56889,6 +56904,7 @@ var init_src = __esm(() => {
|
|
|
56889
56904
|
init_parser2();
|
|
56890
56905
|
init_execution_row();
|
|
56891
56906
|
init_run_expand();
|
|
56907
|
+
init_execution_tags();
|
|
56892
56908
|
init_validation();
|
|
56893
56909
|
init_workflow2();
|
|
56894
56910
|
init_file_source();
|
|
@@ -206948,7 +206964,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
|
|
|
206948
206964
|
// package.json
|
|
206949
206965
|
var package_default = {
|
|
206950
206966
|
name: "@eigenpal/cli",
|
|
206951
|
-
version: "0.20.
|
|
206967
|
+
version: "0.20.21",
|
|
206952
206968
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
206953
206969
|
keywords: [
|
|
206954
206970
|
"eigenpal",
|
|
@@ -206997,7 +207013,6 @@ var package_default = {
|
|
|
206997
207013
|
"generate:cli-docs": "bun scripts/generate-cli-docs.ts",
|
|
206998
207014
|
"generate:cli-docs:check": "bun scripts/generate-cli-docs.ts --check",
|
|
206999
207015
|
"generate:logo": "bun scripts/render-logo-ascii.ts --cells 20",
|
|
207000
|
-
lint: "eslint src/",
|
|
207001
207016
|
test: "bun test src/ scripts/",
|
|
207002
207017
|
typecheck: "tsc --noEmit"
|
|
207003
207018
|
},
|
|
@@ -207016,7 +207031,7 @@ var package_default = {
|
|
|
207016
207031
|
"@eigenpal/types": "workspace:*",
|
|
207017
207032
|
"@eigenpal/workflow-yaml": "workspace:*",
|
|
207018
207033
|
"@t3-oss/env-core": "^0.13.11",
|
|
207019
|
-
typescript: "^
|
|
207034
|
+
typescript: "^7.0.2"
|
|
207020
207035
|
},
|
|
207021
207036
|
files: [
|
|
207022
207037
|
"dist",
|
|
@@ -241085,7 +241100,7 @@ function registerRunsCommands(program) {
|
|
|
241085
241100
|
process.stderr.write("`eigenpal runs` requires a subcommand. Run `eigenpal runs --help`.\n");
|
|
241086
241101
|
process.exit(2);
|
|
241087
241102
|
});
|
|
241088
|
-
const listRunsCmd = addJsonFlag(withPagination(withBaseUrl(runs.command("list [source]")), 50)).alias("ls").description("List runs across workflows and agents, optionally scoped to one source.").option("--type <type>", "Filter by run type: workflow|agent").option("--status <status>", "Filter by run status").option("--source-ref <ref>", "Filter agent runs by source ref").option("--batch-id <id>", "Filter eval/experiment runs by batch id").option("--example-id <id>", "Filter eval runs by example id").option("--example-id-contains <text>", "Filter eval runs by example id substring").option("--from <date>", "Created at or after this ISO timestamp or relative date").option("--to <date>", "Created before this ISO timestamp or relative date").option("--created-after <date>", "Alias for --from").option("--created-before <date>", "Alias for --to").option("--completed-after <date>", "Completed at or after this ISO timestamp or relative date").option("--completed-before <date>", "Completed before this ISO timestamp or relative date").option("--compact", "Render compact run rows").option("--sort <field>", "Sort field; only createdAt is supported").option("--order <asc|desc>", "Sort order; only desc is supported");
|
|
241103
|
+
const listRunsCmd = addJsonFlag(withPagination(withBaseUrl(runs.command("list [source]")), 50)).alias("ls").description("List runs across workflows and agents, optionally scoped to one source.").option("--tag <tag>", "Filter by an exact, case-sensitive execution tag").option("--type <type>", "Filter by run type: workflow|agent").option("--status <status>", "Filter by run status").option("--source-ref <ref>", "Filter agent runs by source ref").option("--batch-id <id>", "Filter eval/experiment runs by batch id").option("--example-id <id>", "Filter eval runs by example id").option("--example-id-contains <text>", "Filter eval runs by example id substring").option("--from <date>", "Created at or after this ISO timestamp or relative date").option("--to <date>", "Created before this ISO timestamp or relative date").option("--created-after <date>", "Alias for --from").option("--created-before <date>", "Alias for --to").option("--completed-after <date>", "Completed at or after this ISO timestamp or relative date").option("--completed-before <date>", "Completed before this ISO timestamp or relative date").option("--compact", "Render compact run rows").option("--sort <field>", "Sort field; only createdAt is supported").option("--order <asc|desc>", "Sort order; only desc is supported");
|
|
241089
241104
|
listRunsCmd.action(action(listRuns));
|
|
241090
241105
|
addJsonFlag(withBaseUrl(runs.command("get <run-id>"))).description("Get one run.").option("--step <name>", "For workflow runs, show only this step (or comma-separated list)").option("--select <path>", "Print only a nested JSON value; implies JSON output (for example output.subjects or output.subjects[].name)").option("--expand <sections>", "Comma-separated server expand sections for GET /api/v1/runs/:id: input, usage, execution, debug. Use execution for status/schemaValid; completed runs include top-level output/files/error.").option("--include <parts>", "Comma-separated local workflow step projection fields (error, duration, inputRef, …). Legacy expand names are mapped when possible; use --expand for server sections.", "review").action(action(getRun));
|
|
241091
241106
|
addJsonFlag(withBaseUrl(runs.command("compare <reference-run-id> <run-id>"))).description("Compare one run against another. Repeated workflow steps are matched by stable branch/iteration path.").option("--baseline", "Compare actual outputs from both runs instead of expected artifacts").option("--step <name-or-path>", "For workflow runs, restrict by step name or stable path").option("--out <dir>", "Write comparison artifacts to this directory").option("--normalize-dates", "Normalize YYYYMMDD and YYYY-MM-DD tokens in filenames/text").option("--fail-on-diff", "Exit 1 when comparison status is fail").action(action(compareRun));
|
|
@@ -241982,6 +241997,7 @@ async function listRuns(source, opts) {
|
|
|
241982
241997
|
}
|
|
241983
241998
|
function buildRunListParams(opts) {
|
|
241984
241999
|
return compactParams({
|
|
242000
|
+
tag: "tag" in opts ? opts.tag : undefined,
|
|
241985
242001
|
type: "type" in opts ? opts.type : undefined,
|
|
241986
242002
|
sourceRef: "sourceRef" in opts ? opts.sourceRef : undefined,
|
|
241987
242003
|
status: "status" in opts ? opts.status : undefined,
|
|
@@ -244547,6 +244563,8 @@ async function buildPreparedRunRequest(client, input) {
|
|
|
244547
244563
|
const remaining = localFiles.filter((_, index) => !preUploadIndices.has(index));
|
|
244548
244564
|
const form = new FormData;
|
|
244549
244565
|
form.append("target", input.target);
|
|
244566
|
+
if (input.tags?.length)
|
|
244567
|
+
form.append("tags", JSON.stringify(input.tags));
|
|
244550
244568
|
form.append("input", JSON.stringify(inputObj));
|
|
244551
244569
|
if (input.overrides)
|
|
244552
244570
|
form.append("overrides", JSON.stringify(input.overrides));
|
|
@@ -244681,7 +244699,7 @@ async function runSavedWorkflowExamples(workflow, examples, opts) {
|
|
|
244681
244699
|
|
|
244682
244700
|
// src/commands/run.ts
|
|
244683
244701
|
function registerRunCommands(program) {
|
|
244684
|
-
addJsonFlag(withBaseUrl(program.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", `
|
|
244702
|
+
addJsonFlag(withBaseUrl(program.command("run <target>"))).description("Start a workflow or agent run, e.g. workflows.extract-invoice.").option("--tag <tag>", "Execution tag. Repeat for multiple tags.", collectRepeated, []).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", `
|
|
244685
244703
|
Grading --example runs
|
|
244686
244704
|
--example runs the SERVER's stored dataset example for the target — workflows
|
|
244687
244705
|
(workflows.<slug>) and agents (agents.<slug>) alike — so push your latest
|
|
@@ -244707,7 +244725,10 @@ Exit codes
|
|
|
244707
244725
|
}
|
|
244708
244726
|
async function runTarget(target, opts) {
|
|
244709
244727
|
const parsed = parseRunTarget(target);
|
|
244728
|
+
const tags = opts.tag?.length ? ExecutionTagsSchema.parse(opts.tag) : undefined;
|
|
244710
244729
|
if (opts.example) {
|
|
244730
|
+
if (tags)
|
|
244731
|
+
throw new Error("--tag is supported for ad-hoc runs; example runs do not accept tags");
|
|
244711
244732
|
if (opts.inputJson || opts.inputFile && opts.inputFile.length > 0) {
|
|
244712
244733
|
throw new Error("--example cannot be combined with --input-json or --input-file");
|
|
244713
244734
|
}
|
|
@@ -244732,16 +244753,20 @@ async function runTarget(target, opts) {
|
|
|
244732
244753
|
const prepared = await buildPreparedRunRequest(client, {
|
|
244733
244754
|
target: pathTarget,
|
|
244734
244755
|
inputFile: opts.inputFile,
|
|
244735
|
-
inputJson: opts.inputJson
|
|
244756
|
+
inputJson: opts.inputJson,
|
|
244757
|
+
tags
|
|
244736
244758
|
});
|
|
244737
244759
|
if (prepared.hasMultipartFiles) {
|
|
244738
244760
|
payload = await client.postFormData(runPath, prepared.form);
|
|
244739
244761
|
} else {
|
|
244740
244762
|
const input = JSON.parse(String(prepared.form.get("input") ?? "{}"));
|
|
244741
|
-
payload = await client.post(runPath, runStartJsonBody(target, input));
|
|
244763
|
+
payload = await client.post(runPath, { ...runStartJsonBody(target, input), tags });
|
|
244742
244764
|
}
|
|
244743
244765
|
} else {
|
|
244744
|
-
payload = await client.post(runPath,
|
|
244766
|
+
payload = await client.post(runPath, {
|
|
244767
|
+
...runStartJsonBody(target, opts.inputJson ? JSON.parse(opts.inputJson) : {}),
|
|
244768
|
+
tags
|
|
244769
|
+
});
|
|
244745
244770
|
}
|
|
244746
244771
|
const runId = String(payload.id ?? "");
|
|
244747
244772
|
let waitedForTerminalRun = false;
|