Cotal TypeScript packages
    Preparing search index...

    Function commandIsCotalSupervisor

    • Does this command line belong to a Cotal manager?

      The test is the supervise, hidden __daemon-manager or hidden __service-manager ARGV TOKEN, which is the manager daemon's own subcommand and is present however it was started — by cotal up's detached re-exec, by a container entrypoint, by cron, or typed by hand. Matching the token rather than a path keeps it true across a global install, a tsx bin/cotal.ts dev run, and a bundled binary, none of which agree on argv[0].

      IT FAILS TOWARD "OURS". A process whose argv merely mentions the word reads as a manager, so a live pid stays trusted. The cost of the opposite error - calling a real manager foreign - is a second manager launched onto a live one, so the loose direction is the safe one.

      Parameters

      • command: string

      Returns boolean