Skip to main content

Module instance

Module instance 

Source
Expand description

Process instance registry for managing running agent instances.

Each running agent registers a JSON file in .hyper-agent/ (relative to cwd) containing its PID, mode, config path, and start time. This allows the CLI to list and stop running instances.

Structs§

InstanceInfo
Information about a running agent instance.

Enums§

InstanceError
Error type for instance registry operations.

Functions§

is_alive
Check whether a process with the given PID is still running.
list_instances
List all registered instances, filtering out stale entries whose processes are no longer alive.
register_instance
Register a running instance by writing its info to the registry directory.
stop_all_instances
Stop all registered instances.
stop_instance
Stop an instance by sending SIGTERM, then unregister it.
unregister_instance
Remove an instance from the registry.