@eigenpal/cli 0.16.10 → 0.16.12
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 +6 -0
- package/dist/cli.js +57 -7
- package/dist/docs-bundle.json +20 -6
- package/dist/skill/reference/debugging.md +6 -9
- package/dist/skill/reference/step-exec.md +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -206278,7 +206278,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
|
|
|
206278
206278
|
// package.json
|
|
206279
206279
|
var package_default = {
|
|
206280
206280
|
name: "@eigenpal/cli",
|
|
206281
|
-
version: "0.16.
|
|
206281
|
+
version: "0.16.12",
|
|
206282
206282
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
206283
206283
|
keywords: [
|
|
206284
206284
|
"eigenpal",
|
|
@@ -239869,6 +239869,49 @@ function projectionIncludeSource(opts) {
|
|
|
239869
239869
|
const parts = [opts.include, opts.expand].filter(Boolean);
|
|
239870
239870
|
return parts.length > 0 ? parts.join(",") : undefined;
|
|
239871
239871
|
}
|
|
239872
|
+
var STEP_HYDRATE_CONCURRENCY = 8;
|
|
239873
|
+
async function mapPool(items, concurrency, fn) {
|
|
239874
|
+
const out = new Array(items.length);
|
|
239875
|
+
let next = 0;
|
|
239876
|
+
async function worker() {
|
|
239877
|
+
while (next < items.length) {
|
|
239878
|
+
const index = next;
|
|
239879
|
+
next += 1;
|
|
239880
|
+
out[index] = await fn(items[index]);
|
|
239881
|
+
}
|
|
239882
|
+
}
|
|
239883
|
+
await Promise.all(Array.from({ length: Math.min(concurrency, items.length) }, () => worker()));
|
|
239884
|
+
return out;
|
|
239885
|
+
}
|
|
239886
|
+
async function hydrateWorkflowStepPayloads(client, runId, steps) {
|
|
239887
|
+
return mapPool(steps, STEP_HYDRATE_CONCURRENCY, async (step) => {
|
|
239888
|
+
const stepId = typeof step.id === "string" ? step.id : null;
|
|
239889
|
+
if (!stepId) {
|
|
239890
|
+
throw new Error(`Cannot load step payloads for ${step.stepName ?? "unknown step"}: missing step execution id.`);
|
|
239891
|
+
}
|
|
239892
|
+
try {
|
|
239893
|
+
const full = await client.get(`/v1/runs/${encodeURIComponent(runId)}/steps/${encodeURIComponent(stepId)}`);
|
|
239894
|
+
return { ...step, ...full };
|
|
239895
|
+
} catch (error) {
|
|
239896
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
239897
|
+
throw new Error(`Failed to load payloads for step ${step.stepName ?? stepId} on run ${runId}: ${reason}`);
|
|
239898
|
+
}
|
|
239899
|
+
});
|
|
239900
|
+
}
|
|
239901
|
+
function wantsWorkflowStepPayloads(includes) {
|
|
239902
|
+
if (!includes)
|
|
239903
|
+
return false;
|
|
239904
|
+
const wanted = new Set(includes.split(",").map((part) => part.trim()));
|
|
239905
|
+
return [
|
|
239906
|
+
"input",
|
|
239907
|
+
"config",
|
|
239908
|
+
"resolvedConfig",
|
|
239909
|
+
"inputRef",
|
|
239910
|
+
"inputData",
|
|
239911
|
+
"output",
|
|
239912
|
+
"outputData"
|
|
239913
|
+
].some((field) => wanted.has(field));
|
|
239914
|
+
}
|
|
239872
239915
|
async function getRun(executionId, opts) {
|
|
239873
239916
|
const client = buildClient2(opts);
|
|
239874
239917
|
const run = toLegacyRunView(await client.get(`/v1/runs/${encodeURIComponent(executionId)}`, {
|
|
@@ -239878,9 +239921,12 @@ async function getRun(executionId, opts) {
|
|
|
239878
239921
|
throw new Error("Agent runs do not have workflow steps. Use `eigenpal runs get <run-id> --json` to inspect the agent run payload.");
|
|
239879
239922
|
}
|
|
239880
239923
|
if (isWorkflowRun(run)) {
|
|
239881
|
-
const steps = filterWorkflowSteps(run.stepExecutions, opts.step);
|
|
239882
239924
|
const projectionIncludes = workflowStepProjectionIncludes(projectionIncludeSource(opts));
|
|
239883
|
-
|
|
239925
|
+
let steps = filterWorkflowSteps(run.stepExecutions, opts.step);
|
|
239926
|
+
if (wantsWorkflowStepPayloads(projectionIncludes) || Boolean(opts.step)) {
|
|
239927
|
+
steps = await hydrateWorkflowStepPayloads(client, executionId, steps);
|
|
239928
|
+
}
|
|
239929
|
+
const projectedRun = opts.step || wantsWorkflowStepPayloads(projectionIncludes) ? { ...run, stepExecutions: projectWorkflowSteps(steps, projectionIncludes) } : { ...run, stepExecutions: steps };
|
|
239884
239930
|
if (opts.select) {
|
|
239885
239931
|
return printJson2(selectJsonValue(projectedRun, opts.select));
|
|
239886
239932
|
}
|
|
@@ -240326,7 +240372,11 @@ async function compareRun(referenceId, executionId, opts) {
|
|
|
240326
240372
|
expand: "execution"
|
|
240327
240373
|
}));
|
|
240328
240374
|
if (isWorkflowRun(reference) && isWorkflowRun(target)) {
|
|
240329
|
-
const
|
|
240375
|
+
const [hydratedReferenceSteps, hydratedTargetSteps] = await Promise.all([
|
|
240376
|
+
hydrateWorkflowStepPayloads(client, referenceId, filterWorkflowSteps(reference.stepExecutions, opts.step)),
|
|
240377
|
+
hydrateWorkflowStepPayloads(client, executionId, filterWorkflowSteps(target.stepExecutions, opts.step))
|
|
240378
|
+
]);
|
|
240379
|
+
const report = compareWorkflowRuns(referenceId, { ...reference, stepExecutions: hydratedReferenceSteps }, executionId, { ...target, stepExecutions: hydratedTargetSteps }, opts.step);
|
|
240330
240380
|
if (opts.json) {
|
|
240331
240381
|
printJson2(report);
|
|
240332
240382
|
} else {
|
|
@@ -242383,7 +242433,7 @@ function abortError(signal) {
|
|
|
242383
242433
|
return signal.reason;
|
|
242384
242434
|
return typeof DOMException !== "undefined" ? new DOMException("Upload aborted", "AbortError") : Object.assign(new Error("Upload aborted"), { name: "AbortError" });
|
|
242385
242435
|
}
|
|
242386
|
-
async function
|
|
242436
|
+
async function mapPool2(items, concurrency, signal, worker) {
|
|
242387
242437
|
if (items.length === 0)
|
|
242388
242438
|
return;
|
|
242389
242439
|
let cursor = 0;
|
|
@@ -242460,11 +242510,11 @@ async function uploadPresignedMultipartParts(options) {
|
|
|
242460
242510
|
};
|
|
242461
242511
|
let pending = await pendingPartNumbers();
|
|
242462
242512
|
if (pending.length > 0) {
|
|
242463
|
-
await
|
|
242513
|
+
await mapPool2(pending, concurrency, options.signal, uploadOne);
|
|
242464
242514
|
}
|
|
242465
242515
|
pending = await pendingPartNumbers();
|
|
242466
242516
|
if (pending.length > 0) {
|
|
242467
|
-
await
|
|
242517
|
+
await mapPool2(pending, concurrency, options.signal, uploadOne);
|
|
242468
242518
|
pending = await pendingPartNumbers();
|
|
242469
242519
|
}
|
|
242470
242520
|
if (pending.length > 0) {
|