fix: normalize heartbeat targets

This commit is contained in:
Peter Steinberger
2026-01-24 13:17:02 +00:00
parent 9d742ba51f
commit ef7971e3a4
13 changed files with 163 additions and 42 deletions
+4 -1
View File
@@ -2,6 +2,7 @@ import type { Command } from "commander";
import type { CronJob } from "../../cron/types.js";
import { danger } from "../../globals.js";
import { defaultRuntime } from "../../runtime.js";
import { normalizeAgentId } from "../../routing/session-key.js";
import type { GatewayRpcOpts } from "../gateway-rpc.js";
import { addGatewayClientOptions, callGatewayFromCli } from "../gateway-rpc.js";
import { parsePositiveIntOrUndefined } from "../program/helpers.js";
@@ -138,7 +139,9 @@ export function registerCronAddCommand(cron: Command) {
}
const agentId =
typeof opts.agent === "string" && opts.agent.trim() ? opts.agent.trim() : undefined;
typeof opts.agent === "string" && opts.agent.trim()
? normalizeAgentId(opts.agent.trim())
: undefined;
const payload = (() => {
const systemEvent = typeof opts.systemEvent === "string" ? opts.systemEvent.trim() : "";