maybe the script can just notify the agent via AF_LOCAL socket or fifo, instead of talking to the api servers by itself?
maybe the script can just notify the agent via AF_LOCAL socket or fifo, instead of talking to the api servers by itself?