tcmts.cli.running

test/
1 definitions
Running type
A long-running tcm on a codebase, as its record says (`runDir`): its process, the command and what it runs, where it's listening, the branch it's on, when it started, the process that started it, and its arguments as given.
liveRunning (root: string) => Running[]
The long-running tcms on the codebase in `root` now, oldest first (the records of ones that stopped are cleared away). One running that can't be signalled (another user's, or outside a sandbox) is running all the same; a record that can't be read, or is half-written (a `.part`), isn't one.
ps (cb: Codebase) => number
`tcm ps`: what tcm runs on the codebase now, oldest first: each `tcm dev`, `start` and `serve` (with the app it runs, the branch it's on, where it's listening and how long it's run), then each agent's MCP server (`tcm mcp`, with its session's branch and the directory it's for).
runDir (root: string) => string
Where the long-running tcms on a codebase say so (`tcm dev`, `start`, `serve`): a file each, by process id.
sayRunning (root: string, r: { command: string; app?: string | undefined; url?: string | undefined; branch?: s…
Say this process is running on the codebase in `root` (written whole: a file beside it, renamed over it), its record taken away as it exits. A process stopped by a signal its handlers don't see leaves its record, which the next reader clears away (`liveRunning`).
shownUptime (ms: number) => string
How long something has run, briefly: 40s, 12m, 3h, 2d.