@fieldwork-ai/cli 0.23.0 → 0.24.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.
|
@@ -15,7 +15,7 @@ async function fetchRuns(automationId, query) {
|
|
|
15
15
|
}
|
|
16
16
|
function runStatusLine(run) {
|
|
17
17
|
const parts = [
|
|
18
|
-
`run ${run.
|
|
18
|
+
`run ${run.run_id}`,
|
|
19
19
|
run.status,
|
|
20
20
|
`triggered by ${run.source ?? "unknown"}`,
|
|
21
21
|
`created ${run.created_at}`,
|
|
@@ -110,7 +110,7 @@ export function registerAutomationCommands(program) {
|
|
|
110
110
|
.description(operation === "wait" ? "Wait briefly for a run" : "Inspect one run")
|
|
111
111
|
.action((name, runId) => callTool(`automations_${operation.replaceAll("-", "_")}`, {
|
|
112
112
|
name,
|
|
113
|
-
|
|
113
|
+
run_id: runId,
|
|
114
114
|
...(operation === "get-run" ? { detail: "full" } : {}),
|
|
115
115
|
}));
|
|
116
116
|
}
|
|
@@ -175,7 +175,7 @@ export function registerAutomationCommands(program) {
|
|
|
175
175
|
const latest = (await fetchRuns(found.automation_id, "?limit=1"))[0];
|
|
176
176
|
if (!latest)
|
|
177
177
|
fail(`"${name}" has no runs yet`, EXIT.notFound);
|
|
178
|
-
await followRun(found.automation_id, latest.
|
|
178
|
+
await followRun(found.automation_id, latest.run_id, Number(opts.interval) || 3, json);
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
181
|
const suffix = opts.limit ? `?limit=${opts.limit}` : "";
|
|
@@ -211,7 +211,7 @@ export function registerAutomationCommands(program) {
|
|
|
211
211
|
await confirm(`Run "${name}" now?`, yes);
|
|
212
212
|
const body = await apiJson(`/api/organizations/${requireOrgId()}/automations/${found.automation_id}/runs`, { method: "POST" });
|
|
213
213
|
if (opts.follow) {
|
|
214
|
-
await followRun(found.automation_id, body.run.
|
|
214
|
+
await followRun(found.automation_id, body.run.run_id, Number(opts.interval) || 3, json);
|
|
215
215
|
return;
|
|
216
216
|
}
|
|
217
217
|
printData(body, json);
|