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

Function countAttachedClients

src/testing/tmuxHarness.ts:236–253  ·  view source on GitHub ↗
(session: IsolatedTmuxSession)

Source from the content-addressed store, hash-verified

234}
235
236function countAttachedClients(session: IsolatedTmuxSession): number {
237 try {
238 const output = runTmux(session.socketName, [
239 'list-clients',
240 '-t',
241 session.sessionName,
242 '-F',
243 '#{client_name}',
244 ]).stdout.trim()
245 if (output.length === 0) return 0
246 return output
247 .split('\n')
248 .map(line => line.trim())
249 .filter(line => line.length > 0).length
250 } catch {
251 return 0
252 }
253}
254
255export async function attachTmuxClient(
256 session: IsolatedTmuxSession,

Callers 1

attachTmuxClientFunction · 0.85

Calls 1

runTmuxFunction · 0.85

Tested by

no test coverage detected