master-zapier-plan-draft/docs/modules/verae-fleet/supervisor.md
George Lambert ac38676645
Some checks are pending
offline / test (push) Waiting to run
Add NATS account-balance SoT and statement review for customers, CS, and sales
Internal billing now uses verae.billing.* request-reply and pubs. zappier-account-balance tracks prepaid, credits, usage, and payments. Portal, admin, CS, and sales all review the same statement. Independent Forgejo repos stay split via push-module-repos.
2026-09-11 15:35:37 -04:00

3 KiB
Raw Blame History

verae-fleet/supervisor

Package: verae-fleet
Source: packages/verae-fleet/src/supervisor.js
Lines: 528

What this module is

Implementation module in verae-fleet. The tables below are extracted from the source (signatures + JSDoc).

Exports

spawnLocal, Supervisor

Types / interfaces / classes

Kind Name
class Supervisor

Functions

Name Parameters Param types (JSDoc) Returns Calls (same file / helpers)
spawnLocal root, spec, env, healthPort unknown see Call graph
waitExit child, ms unknown see Call graph
waitForHealth rec, ms unknown see Call graph

Methods (class / object)

Name Parameters
constructor opts = {}
machines (none)
addMachine spec
setMachineEnabled id, enabled
checkMachine id
machineOf rec
controlInstance rec, pathname, body
log type, detail
spec serviceId
nextIndex serviceId
startOne serviceId, opts = {}
stopInstance instanceId, { replace = true } = {}
pauseInstance instanceId, { replace = true } = {}
resumeInstance instanceId
restartInstance instanceId
markUnhealthy instanceId
probe rec
available serviceId
reconcile only
startService serviceId
stopService serviceId, { holdFloor = false } = {}
pauseService serviceId
resumeService serviceId
stopAll (none)
status (none)

What it imports / requires

  • node:child_process
  • node:fs
  • node:path
  • node:url
  • ./load.js
  • ./health.js
  • ./classify.js
  • ./machines.js
  • ./rtt.js
  • ./ssh.js

Call graph (identifiers invoked)

floor, join, dirname, fileURLToPath, apps, spawnLocal, resolve, spawn, constructor, loadFleet, mkdirSync, isArray, machines, addMachine, upsertMachine, saveOverlay, log, setMachineEnabled, find, checkMachine, sshCheck, httpProbe, machineOf, controlInstance, sshHttp, postControl, toISOString, push, splice, spec, nextIndex, values, filter, map, has, startOne, get, pickMachine, sshSpawnWorker, now, on, set, waitForHealth, stopInstance, sshKillWorker, kill, waitExit, delete, reconcile, pauseInstance, resumeInstance, restartInstance, markUnhealthy, probe, isFinite, summarizeRtt, available, keys, min, startService

Each identifier is a call site in this file. Follow the import list to see the defining module; open that modules MD for parameter and return types.

Return values (how to read this)

  • HTTP route handlers return Express res.json(...) bodies (see route docs).
  • Zapier perform functions return a single object (creates) or an array (triggers/searches).
  • Pricing functions return integer cents on Quote.totalCents.