@hone-ai/cli 1.12.2 → 1.13.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/hone-cli.js +44 -0
- package/package.json +1 -1
package/hone-cli.js
CHANGED
|
@@ -5277,6 +5277,50 @@ program
|
|
|
5277
5277
|
}
|
|
5278
5278
|
});
|
|
5279
5279
|
|
|
5280
|
+
// ── SHOW step output (HC-019n-followup-6) ─────────────────────────────────────
|
|
5281
|
+
// `hone show step <workflowId> <stepKey> [--attempt N]` — fetch the
|
|
5282
|
+
// actual LLM output of a specific orchestrator step. Pre-fix, the
|
|
5283
|
+
// /orchestrate/<id> endpoint returned step METADATA only; operators
|
|
5284
|
+
// approving a human gate (step_4 typically) had no way to see what
|
|
5285
|
+
// they were approving, and review-fail loops were undiagnosable.
|
|
5286
|
+
const showCmd = program.command('show').description('Inspect orchestrator step output (HC-019n-followup-6)');
|
|
5287
|
+
showCmd
|
|
5288
|
+
.command('step <workflowId> <stepKey>')
|
|
5289
|
+
.description('Print the actual LLM output of an orchestrator step (latest attempt by default)')
|
|
5290
|
+
.option('--attempt <n>', 'Specific attempt number (default: latest)')
|
|
5291
|
+
.action(async (workflowId, stepKey, opts) => {
|
|
5292
|
+
const config = getConfig();
|
|
5293
|
+
const client = api(config);
|
|
5294
|
+
try {
|
|
5295
|
+
const url = `/orchestrate/${workflowId}/step/${stepKey}${opts.attempt ? `?attempt=${opts.attempt}` : ''}`;
|
|
5296
|
+
const r = await client.get(url);
|
|
5297
|
+
const s = r.data;
|
|
5298
|
+
console.log(`── step output ──────────────────────────────────────────`);
|
|
5299
|
+
console.log(` runId: ${s.runId}`);
|
|
5300
|
+
console.log(` stepKey: ${s.stepKey}`);
|
|
5301
|
+
console.log(` agent: ${s.agent}`);
|
|
5302
|
+
console.log(` attempt: ${s.attempt}`);
|
|
5303
|
+
console.log(` status: ${s.status}`);
|
|
5304
|
+
console.log(` gateResult: ${s.gateResult || '(none)'}`);
|
|
5305
|
+
console.log(` startedAt: ${s.startedAt || '(not started)'}`);
|
|
5306
|
+
console.log(` completedAt: ${s.completedAt || '(not completed)'}`);
|
|
5307
|
+
if (s.tokenUsage) console.log(` tokenUsage: ${JSON.stringify(s.tokenUsage)}`);
|
|
5308
|
+
if (s.errorContext) {
|
|
5309
|
+
console.log(``);
|
|
5310
|
+
console.log(`── error_context (retry feedback) ──────────────────────`);
|
|
5311
|
+
console.log(s.errorContext);
|
|
5312
|
+
}
|
|
5313
|
+
console.log(``);
|
|
5314
|
+
console.log(`── output (the LLM's actual response) ──────────────────`);
|
|
5315
|
+
console.log(s.output || '(no output recorded — step may not have completed)');
|
|
5316
|
+
console.log(`────────────────────────────────────────────────────────`);
|
|
5317
|
+
} catch (e) {
|
|
5318
|
+
const msg = e.response?.data?.error || e.message;
|
|
5319
|
+
console.error(`hone show step failed: ${msg}`);
|
|
5320
|
+
process.exit(1);
|
|
5321
|
+
}
|
|
5322
|
+
});
|
|
5323
|
+
|
|
5280
5324
|
// ── CLI setup ─────────────────────────────────────────────────────────────────
|
|
5281
5325
|
program
|
|
5282
5326
|
.name('hone')
|