mirror of
https://github.com/hanzoai/insights.git
synced 2026-10-30 16:15:31 +00:00
The tree was a debranded snapshot of upstream taken around 2026-02-20, and upstream has moved about five months since. This replaces it with upstream master, mechanically re-derived: bin/debrand does the rename, and the pipeline and squashed migrations are restored from the shipped tree. Not a merge. The previous import replaced the tree wholesale in a single commit, so there is no shared content history to merge against. Reproducing the rename on the new tree is what actually converges. What survives: .hanzo/workflows, the Dockerfiles and bin/docker* entrypoints, compose files, LLM.md, and insights/migrations. The squashed initial migration is load-bearing — the live database records it by name, so upstream's ~918 individual migrations cannot come back. Nine products are dropped as unreferenced. Twenty-one more that we do not run are kept anyway because the core app still imports them; unpicking those is a refactor and does not belong in a rebase. This base does not build yet, and the reasons are not in the rename: upstream now wants Python 3.13.13 against our 3.12.12 and Django 5.2 against our 4.2, and the dependency manifests still name upstream packages that we republish under our own names. Those are decisions, not renames.
101 lines
4.4 KiB
Plaintext
101 lines
4.4 KiB
Plaintext
# agent-proxy local development environment variables.
|
|
#
|
|
# Copy to .dev.vars and fill in real values. The .dev.vars file is git-ignored;
|
|
# this example file is checked in as documentation.
|
|
#
|
|
# In production all values come from Kubernetes Secrets or environment injection.
|
|
# Required vars are marked; optional vars show their default when absent.
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Redis
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Task-run stream Redis connection URL. Required in production (NODE_ENV=production).
|
|
# In non-production NODE_ENV the service falls back to a local Redis instance
|
|
# when this is unset.
|
|
# nosemgrep: trailofbits.generic.redis-unencrypted-transport.redis-unencrypted-transport
|
|
TASKS_REDIS_URL=redis://localhost:6379
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# JWT / Auth
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# RS256 public key PEM used to verify both token types:
|
|
# - insights:stream_read (GET /v1/runs/:run/stream leg)
|
|
# - insights:sandbox_event_ingest (POST /v1/runs/:run/ingest leg)
|
|
#
|
|
# Required. Store the PEM with literal \n sequences (backslash + n) — the
|
|
# service normalizes them to real newlines before calling importSPKI.
|
|
#
|
|
# To generate a test key pair:
|
|
# openssl genrsa -out test-private.pem 2048
|
|
# openssl rsa -in test-private.pem -pubout -out test-public.pem
|
|
# awk 'NR>1{printf "%s", prev} {prev=$0} END{print prev}' test-public.pem \
|
|
# | sed 's/-----BEGIN PUBLIC KEY-----/-----BEGIN PUBLIC KEY-----\\n/' \
|
|
# | sed 's/-----END PUBLIC KEY-----/\\n-----END PUBLIC KEY-----/'
|
|
SANDBOX_JWT_PUBLIC_KEY=
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Callbacks
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Base URL of the internal Django service (no trailing slash). Required in
|
|
# production. When unset in dev the callback fires are silently skipped, so
|
|
# local ingest testing works without a running Django process.
|
|
AGENT_PROXY_DJANGO_CALLBACK_URL=http://localhost:8000
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# HTTP server
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# TCP port the Hono server listens on. Optional; default 8003.
|
|
PORT=8003
|
|
|
|
# Per-pod cap on concurrent SSE stream connections. Each open stream holds a
|
|
# dedicated Redis connection, so this protects the Redis maxclients budget.
|
|
# Optional; default 1000.
|
|
AGENT_PROXY_MAX_CONCURRENT_STREAMS=1000
|
|
|
|
# Cap on concurrent SSE stream connections per task run, so a single
|
|
# stream-read token cannot exhaust the pod-wide budget. Optional; default 25.
|
|
AGENT_PROXY_MAX_STREAMS_PER_RUN=25
|
|
|
|
# Bearer token gating GET /_metrics when set (scrape with: Authorization:
|
|
# Bearer <token>). Deployments scrape in-cluster via annotation-based Prometheus
|
|
# (no auth header) and block external /_metrics at the ingress, so this is left
|
|
# empty there; set it only for a scrape path that can send the header.
|
|
AGENT_PROXY_METRICS_TOKEN=
|
|
|
|
# TCP bind address. Optional; default 0.0.0.0 (all interfaces).
|
|
HOST=0.0.0.0
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# CORS
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Comma-separated list of allowed origins for CORS responses.
|
|
# Use * to allow all origins (dev only). Leave empty to disable CORS.
|
|
# Example: http://localhost:3000,https://app.example.com
|
|
TASKS_AGENT_PROXY_CORS_ORIGINS=*
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Logging
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Log level threshold: debug | info | warn | error.
|
|
# Defaults: debug (local dev), info (production), warn (test).
|
|
AGENT_PROXY_LOG_LEVEL=debug
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Lifecycle / shutdown
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Maximum time in milliseconds to wait for in-flight SSE connections to drain
|
|
# before the process exits on SIGTERM/SIGINT. Optional; default 300000 (5 min).
|
|
SHUTDOWN_GRACE_MS=300000
|
|
|
|
# Additional sleep in milliseconds before closing the HTTP server on shutdown.
|
|
# Useful when a load balancer needs time to drain traffic before the pod stops.
|
|
# Optional; default 0 (no pre-stop delay).
|
|
SHUTDOWN_PRESTOP_DELAY_MS=0
|