INNER CODE UNIT · TypeScript
startCommandWatchdog
stablyai/agent-slack · src/index.ts:42
function startCommandWatchdog(args: string[]): void {
if (!shouldStartCommandWatchdog(args)) {
return;
}
const timeoutMs = getCommandTimeoutMs();
const timer = setTimeout(() => {
console.error(
`agent-slack command timed out after ${timeoutMs}ms. Set AGENT_SLACK_COMMAND_TIMEOUT_MS to adjust.`,
);
process.exit(124);
}, timeoutMs);
(timer as { unref?: () => void }).unref?.();
}
program
.name("agent-slack")
.description("Slack automation CLI for AI agents")
.version(getPackageVersion())