This commit is contained in:
Peter Jones 2026-01-30 09:28:52 -06:00 committed by GitHub
commit bcf784d3b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -265,6 +265,30 @@ export function registerGatewayCli(program: Command) {
});
});
gatewayCallOpts(
gateway
.command("wake")
.description("Send a wake event to the Gateway (trigger agent processing)")
.option("--text <text>", "Wake event text (injected as system event)", "Wake event")
.option("--mode <mode>", "Wake mode: now (immediate) or next-heartbeat (default)", "now")
.action(async (opts) => {
await runGatewayCommand(async () => {
const mode = opts.mode === "next-heartbeat" ? "next-heartbeat" : "now";
const text = String(opts.text || "Wake event");
const result = await callGatewayCli("wake", opts, { mode, text });
if (opts.json) {
defaultRuntime.log(JSON.stringify(result, null, 2));
return;
}
const rich = isRich();
defaultRuntime.log(colorize(rich, theme.heading, "Gateway Wake"));
defaultRuntime.log(
`${colorize(rich, theme.success, "OK")} · mode: ${mode} · text: "${text}"`,
);
}, "Gateway wake failed");
}),
);
gateway
.command("discover")
.description("Discover gateways via Bonjour (local + wide-area if configured)")