Skip to main content

Module chat_watch

Module chat_watch 

Source
Expand description

Durable, supervised jobs started by a standing chat. Results use the same draft/turn delivery as task completion notices; jobs never run twice.

Constants§

DEFAULT_TIMEOUT
Default and maximum job durations, in seconds.
MAX_CONCURRENT
Reservations count against this global limit too.
MAX_TIMEOUT
Long jobs should be filed as tasks instead.
OUTPUT_CAP
Maximum retained output, shared by stdout and stderr.

Functions§

authorize
Only the standing chat’s own environment chooses the destination.
execute
The launch gate prevents commands from starting before their identity is durable. This internal entry point cannot execute a job from another PID.
start
Reserve a slot and detach a supervisor. Return only after it has recorded startup (including an executable spawn failure, which is reported normally).
supervise
Internal supervisor entry point. The per-job OS lock is a durable lease: released on process death, without age-based guesses or restarting the job.
sweep
Reconcile completed or abandoned watches and queue each notice once. Lock order is watch store, job lease, talk store. Transient errors are retried.