MCPcopy Index your code
hub / github.com/ByBrawe/opencode-loop / runShellCommand

Function runShellCommand

src/index.js:564–575  ·  view source on GitHub ↗
(command, cwd, timeoutMs = 120_000)

Source from the content-addressed store, hash-verified

562 }
563 }
564 return String(args)
565}
566
567function rememberSession(directory, client, sessionID) {
568 if (!sessionID) return
569 knownSessions.set(sessionID, { directory, client, seenAt: now() })
570 startHeartbeat()
571}
572
573function startHeartbeat() {
574 if (heartbeatTimer) return
575 heartbeatTimer = setInterval(() => {
576 for (const [sessionID, info] of [...knownSessions.entries()]) {
577 if (!info || now() - (info.seenAt || 0) > 12 * 60 * 60 * 1000) {
578 knownSessions.delete(sessionID)

Callers 4

notifyJobFunction · 0.85
runGoalChecksFunction · 0.85
finalizeActiveRunFunction · 0.85
maybeRunDueJobsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected