MCPcopy Create free account
hub / github.com/ByBrawe/opencode-loop / arg

Function arg

scripts/loopd.mjs:8–11  ·  view source on GitHub ↗
(name, fallback = null)

Source from the content-addressed store, hash-verified

6import { homedir } from "node:os"
7import { fileURLToPath } from "node:url"
8
9const args = process.argv.slice(2)
10const configuredRetryMs = Number(process.env.OPENCODE_LOOPD_FAILED_RUN_RETRY_MS)
11const FAILED_RUN_RETRY_MS = Number.isFinite(configuredRetryMs) && configuredRetryMs >= 0 ? configuredRetryMs : 5_000
12const OPENCODE_BIN = process.env.OPENCODE_BIN || "opencode"
13const SCHTASKS_BIN = process.env.SCHTASKS_BIN || "schtasks"
14const TASK_ROOT = process.env.OPENCODE_LOOPD_TASK_DIR || path.join(process.env.LOCALAPPDATA || path.join(homedir(), "AppData", "Local"), "opencode-loop", "tasks")

Callers 4

readPromptFunction · 0.85
daemonFunction · 0.85
installTaskFunction · 0.85
uninstallTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected