MCPcopy Create free account
hub / github.com/Noumena-Network/code / hasSession

Function hasSession

src/tools/shared/spawnMultiAgent.ts:160–167  ·  view source on GitHub ↗

* Checks if a tmux session exists

(sessionName: string)

Source from the content-addressed store, hash-verified

158 * Checks if a tmux session exists
159 */
160async function hasSession(sessionName: string): Promise<boolean> {
161 const result = await execFileNoThrow(TMUX_COMMAND, [
162 'has-session',
163 '-t',
164 sessionName,
165 ])
166 return result.code === 0
167}
168
169/**
170 * Creates a new tmux session if it doesn't exist

Callers 1

ensureSessionFunction · 0.85

Calls 1

execFileNoThrowFunction · 0.50

Tested by

no test coverage detected