Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
141 lines (121 loc) · 7.23 KB
/
Copy path.env.example
File metadata and controls
141 lines (121 loc) · 7.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Copy to .env and fill in (.env is gitignored). config/settings.py (pydantic-settings) is the
# single reader: every KEY= line here is a Settings field, and vice versa (tests enforce it).
# --- Environment (ADR-0021) ---
# A NAMING suffix only: decode-sandbox-<env>, Opik project decode-<env> (OPIK_PROJECT_NAME wins),
# Modal app + Secret decode-headless-<env>. local | dev | staging | prod.
# DECODE_ENV=local
# --- Inference: LLM provider ---
# One selectable provider; unset stays on gemini. Setup per provider: running_the_code/01_install_and_usage.md
# gemini — one free key, fastest start; rate-limited free tier.
# modal — RECOMMENDED: an open-weights model you serve yourself, no rate limits.
# openrouter — hosted; the openrouter/free router costs $0.
# LLM_PROVIDER=gemini
# Free at https://aistudio.google.com/apikey
GEMINI_API_KEY=
# GEMINI_MODEL=gemini-3.8-flash
OPENROUTER_API_KEY=
# Default is the Free Models Router (auto-routes across free tool-capable models).
# OPENROUTER_MODEL=openrouter/free
# modal: your own endpoint (base_url = {url}/v1) — see running_the_code/02_modal_endpoints.md.
# The modal CLI authenticates separately, not through this file:
# `uv run modal token set --token-id <token-id> --token-secret <token-secret>`.
# Endpoint config:
# MODAL_ENDPOINT_URL=https://your-workspace--your-app.modal.run
# MODAL_ENDPOINT_MODEL=Qwen/Qwen3.6-35B-A3B-FP8
# Proxy tokens that authenticate requests to the endpoint (both, or neither):
# MODAL_PROXY_TOKEN_ID=wk-...
# MODAL_PROXY_TOKEN_SECRET=ws-...
# --- Logging ---
# LOG_LEVEL=INFO
# File-only logging at .decode/logs/decode.log. The path override is NOT a setting — logging.py reads
# it from the process env at import: `export DECODE_LOG_FILE=/tmp/decode.log`; "" disables file logging.
# --- Tool execution / output truncation ---
# BASH_TIMEOUT_S=120.0
# MAX_OUTPUT_LINES=2000 # tool-output truncation caps (lines first, then bytes)
# MAX_OUTPUT_BYTES=50000
# WEB_FETCH_TIMEOUT_S=30.0
# --- Observability: Opik (ADR-0014) ---
# Presence-based: a set OPIK_API_KEY turns tracing on. Keep the block commented so a copied file
# never traces with a bogus key.
# OPIK_API_KEY=
# OPIK_WORKSPACE=default
# OPIK_PROJECT_NAME=decode-local # default derives from DECODE_ENV
# Self-hosted OTLP base (exporter appends /v1/traces); unset = Comet cloud.
# OPIK_URL_OVERRIDE=http://localhost:5173/api/v1/private/otel
# USD per MILLION tokens for a per-token model the price catalog does not know (an OpenRouter slug
# reporting no cost). NOT for modal: a self-hosted endpoint bills GPU-seconds, not tokens. 0.0 =
# unknown, and decode reports no cost.
# LLM_COST_INPUT_USD_PER_MTOK=0.0
# LLM_COST_OUTPUT_USD_PER_MTOK=0.0
# --- Harness artifacts & sessions ---
# Everything decode writes lives under <launch cwd>/.decode (ADR-0012 §6).
# DECODE_DIR=.decode
# SESSIONS_DIR=.decode/sessions
# --- Memory (AGENTS.md / MEMORY.md) ---
# MEMORY_MAX_LINES=200 # MEMORY.md caps; the on-exit compressor fires at the line cap
# MEMORY_MAX_BYTES=25000
# MEMORY_COMPRESSION_ENABLED=true # on-exit MEMORY.md LLM compressor (else drop-oldest)
# --- Context compaction (ADR-0006) ---
# COMPACTION_ENABLED=true # gates only the automatic cascade; /compact always works
# Your model's max INPUT window; also drives the TUI gauge. Resolved per run, first hit wins:
# 1. this setting (suppresses the probe) 2. a provider probe (best effort, once per model per
# process) 3. a static table (Gemini 2.5/3.5/3.8 -> 1048576, Qwen3.6-35B-A3B -> 262144) 4. 200000.
# Set it to override, or to skip the probe on a slow cold-starting endpoint.
# COMPACTION_CONTEXT_WINDOW_TOKENS=262144
# Tiers fire at window*(1-reserve): full at 80%, micro at 60% — keep micro's reserve larger.
# COMPACTION_RESERVE_FRACTION=0.20
# MICROCOMPACTION_RESERVE_FRACTION=0.40
# COMPACTION_KEEP_RECENT_TOKENS=20000 # verbatim recent tail kept by full compaction
# --- Orchestration ---
# SLEEP_MAX_S=60.0 # cap on the ungated sleep tool
# --- Subagents (ADR-0013) ---
# SUBAGENT_MAX_PARALLEL=4 # children at once (mind free-tier rate limits)
# SUBAGENT_MAX_REQUESTS=25 # per-child model-request cap
# SUBAGENT_RESULT_MAX_BYTES=16000 # cap on a child's report
# --- Permissions ---
# Optional allow/deny rules; missing/malformed is non-fatal.
# PERMISSIONS_FILE=.decode/settings.json
# --- Skills ---
# Project skills: <name>/SKILL.md dirs; frontmatter `name` overrides a same-named built-in.
# SKILLS_DIR=.decode/skills
# --- LSP / code intelligence (ADR-0007) ---
# Best-effort: an absent/slow server degrades silently.
# LSP_ENABLED=true # master gate; false = no server ever spawned
# LSP_SERVER_COMMAND=ty # spawn = [command, *args]; args is a JSON list
# LSP_SERVER_ARGS=["server"]
# LSP_DIAGNOSTICS_ON_EDIT=true # passive post-edit enricher only
# LSP_REQUEST_TIMEOUT_S=10.0
# --- Headless runtime (ADR-0019) ---
# RUNTIME_ENABLED=true # master gate for `decode run`
# Model-request ceiling for `decode run` (unset = unbounded; `--max-requests N` overrides per run).
# Past the cap the run stops with one friendly line and a non-zero exit.
# RUNTIME_MAX_REQUESTS=200
# --- Kitaru session recording ---
# KITARU_AGENT_ID=
# local OSS server (make kitaru-local: docker compose + bootstrap; `kitaru logout` stops it):
# KITARU_API_URL=http://localhost:8000
# managed workspace (`kitaru login <url>` first):
# KITARU_API_URL=<managed_workspace_url>
# --- Sandboxing (ADR-0012) ---
# A sandbox mode moves the WHOLE tool scope (file tools + bash) into an isolated /workspace.
# Fresh-exec: the filesystem persists across calls, cd/export don't.
# SANDBOX_MODE=none # none (host, default) | docker (local bind mount) | modal (remote)
# SANDBOX_IMAGE=ghcr.io/astral-sh/uv:python3.12-bookworm-slim # must include bash; git + gh added per backend
# SANDBOX_WORKSPACE_DIR=.decode/sandbox # the host dir that IS the workspace
# Repo cloned into the workspace (--repo overrides; --local = fast local clone). On exit / /ship a
# decode/<session-id> branch is pushed back HOST-SIDE with ambient git creds.
# SANDBOX_REPO=
# SANDBOX_TIMEOUT_S=600.0 # modal sandbox lifetime
# SANDBOX_GIT_USER_NAME=decode # in-workspace commit identity
# SANDBOX_GIT_USER_EMAIL=decode@localhost
# One token for in-sandbox git push/PR (ADR-0016 §2): both backends inject it as GITHUB_TOKEN + git's
# credential helper. A sandboxed process CAN read it — use a scoped, revocable PAT. Empty = hand-back
# only; no credential enters the sandbox.
# SANDBOX_GIT_TOKEN=
# --- Evals (ADR-0017) ---
# Read by top-level evals/ (not shipped in the wheel) via `make eval-benchmark` / `make eval-regression`,
# never `make ci`. Need OPIK_API_KEY + the agent's provider key, plus the
# judge's when it differs; missing a key = skip friendly, exit 0. Full map: running_the_code/05_evals.md.
# EVAL_JUDGE_PROVIDER= # gemini|openrouter|modal for the JUDGE; empty follows LLM_PROVIDER
# EVAL_JUDGE_MODEL= # LiteLLM judge model; empty derives it from the judge provider
# EVAL_PROJECT_NAME=decode-evals # Opik project for eval runs, kept apart from live traces