Documentation
¶
Overview ¶
Package heartbeat implements the ctx system heartbeat subcommand.
It sends a heartbeat webhook on every prompt for continuous session-alive visibility, without producing any agent-visible output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cmd ¶
Cmd returns the "ctx system heartbeat" subcommand.
Returns:
- *cobra.Command: Configured heartbeat subcommand
func Run ¶
Run executes the heartbeat hook logic.
Increments a per-session prompt counter, detects context file modifications since the last heartbeat, reads token usage, and emits a notification plus event log entry. Produces no stdout output; the agent never sees this hook.
Parameters:
- cmd: Cobra command (unused, heartbeat produces no output)
- stdin: standard input for hook JSON
Returns:
- error: Always nil (hook errors are non-fatal)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.