Add CLI heartbeat-run command for manual agent invocation

Add heartbeat-run command that triggers a single agent heartbeat from
the CLI. Register it in the CLI entrypoint alongside existing commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Forgotten
2026-02-17 20:46:07 -06:00
parent c326aeceb5
commit 6dbbf1bbec
2 changed files with 195 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import { Command } from "commander";
import { onboard } from "./commands/onboard.js";
import { doctor } from "./commands/doctor.js";
import { configure } from "./commands/configure.js";
import { heartbeatRun } from "./commands/heartbeat-run.js";
const program = new Command();
@@ -33,4 +34,20 @@ program
.option("-s, --section <section>", "Section to configure (llm, database, logging, server)")
.action(configure);
const heartbeat = program.command("heartbeat").description("Heartbeat utilities");
heartbeat
.command("run")
.description("Run one agent heartbeat and stream live logs")
.requiredOption("-a, --agent-id <agentId>", "Agent ID to invoke")
.option("-c, --config <path>", "Path to config file")
.option(
"--source <source>",
"Invocation source (timer | assignment | on_demand | automation)",
"on_demand",
)
.option("--trigger <trigger>", "Trigger detail (manual | ping | callback | system)", "manual")
.option("--timeout-ms <ms>", "Max time to wait before giving up", "0")
.action(heartbeatRun);
program.parse();