#!/usr/bin/env node /** * tenx-recur — deterministic recurring cost-reduction tick runner. * * Usage: * tenx-recur --policy [--dry-run] [--verbose] * * Exit codes: * 0 success (applied) or no-op (delta below threshold) * 1 policy error (bad YAML, missing required field) * 2 Prometheus unreachable * 3 commit failed (git / gh error) * * One invocation runs one tick. The external scheduler (k8s CronJob, * GitHub Actions, crontab) is responsible for calling this on schedule. * * Environment variables consumed: * LOG10X_ENV_ID — 10x environment ID (overrides policy config_plane.env_id) * LOG10X_API_KEY — API key for hosted log10x Prometheus backend * LOG10X_CUSTOMER_METRICS_URL — Prometheus/Mimir/… base URL (customer self-hosted) * LOG10X_CUSTOMER_METRICS_TYPE — backend type (see customer-metrics.ts) * LOG10X_CUSTOMER_METRICS_AUTH — auth credential * LOG10X_GITOPS_REPO_PATH — local path to the cloned gitops repo * LOG10X_RETRY_BASE_MS — retry base delay in ms (default 250) * * The policy's config_plane.repo may also be an S3 prefix (s3://bucket/prefix) * instead of a git repo — state is pulled from and pushed to the prefix with * the aws CLI (must be on PATH), and no git commit happens. */ export {};