#!/usr/bin/env node
'use strict';
const fs = require('fs');
const os = require('os');
const path = require('path');
const DEFAULT_BASH_TIMEOUT_SECONDS = 30 * 60;
const DEFAULT_LIMIT = 10;
const DEFAULT_WAKE_GRACE_MULTIPLIER = 2;
const DEFAULT_WATCH_INTERVAL_SECONDS = 5;
function usage() {
console.log([
'Usage:',
' node scripts/loop-status.js [--json] [--home
] [--limit ] [--watch]',
' node scripts/loop-status.js --transcript [--json] [--watch]',
'',
'Options:',
' --json Emit machine-readable status JSON',
' --home Override the home directory to scan',
' --transcript Inspect one transcript directly',
' --limit Maximum recent transcripts to inspect (default: 10)',
' --bash-timeout-seconds Age before a pending Bash call is stale (default: 1800)',
' --wake-grace-multiplier ScheduleWakeup grace multiplier (default: 2)',
' --now