-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
239 lines (214 loc) · 9.56 KB
/
Copy path.env.example
File metadata and controls
239 lines (214 loc) · 9.56 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# =============================================================================
# Core runtime / deploy
# =============================================================================
NODE_ENV=production
# Web-service only; the worker path ignores this.
PORT=10000
DATA_DIR=/data
LOG_LEVEL=INFO
# =============================================================================
# Launch / activation / polling
# =============================================================================
LAUNCH_MODE=prod
# Optional legacy fallback for local scripts/tests when LAUNCH_MODE is unset.
# DRY_RUN=false
# Runtime handle used by polling/posting.
BOT_USERNAME=organoid_on_sol
# Conservative base; render.yaml keeps the production override explicit.
BOT_ACTIVATION_MODE=global
# Optional allowlist used only when LAUNCH_MODE=staging
# ALLOWLIST_HANDLES=
# Optional activation whitelist when BOT_ACTIVATION_MODE=whitelist
# BOT_WHITELIST_USERNAMES=
# BOT_WHITELIST_USER_IDS=
POLL_INTERVAL_MS=30000
MENTIONS_SOURCE=search
# =============================================================================
# X / Twitter API
# =============================================================================
# Required for X OAuth refresh flow and live posting.
X_CLIENT_ID=
X_CLIENT_SECRET=
X_REFRESH_TOKEN=
# Optional access token cache; refresh still works without it.
X_ACCESS_TOKEN=
X_REFRESH_BUFFER_SECONDS=300
X_OAUTH_TOKEN_URL=https://api.x.com/2/oauth2/token
# Optional bootstrap/cache state for local OAuth helper scripts; keep these out of Render secrets unless needed.
# X_EXPIRES_IN=7200
# X_TOKEN_CREATED_AT=
# X_BOT_USER_ID=
# X_BOT_USERNAME=
# =============================================================================
# Storage / state / redis / kv
# =============================================================================
# Conservative base; Render overrides this to true and requires KV_URL.
USE_REDIS=false
# Only if USE_REDIS=true.
KV_URL=
REDIS_KEY_PREFIX=ORGANOID:
# Optional overrides.
# MAX_LLM_CALLS_PER_MINUTE=30
# COST_WEIGHT_THREAD=2
# COST_WEIGHT_REPLY=1
# RATE_LIMIT_BACKEND=store
# POLL_LOCK_ENABLED=true
# DEBUG_ARTIFACTS=false
# =============================================================================
# Networking / fetch
# =============================================================================
# Optional HTTP retry tuning used by shared fetch helpers.
# FETCH_TIMEOUT_MS=30000
# FETCH_BACKOFF_BASE_MS=5000
# FETCH_BACKOFF_MAX_MS=300000
# FETCH_RETRY_JITTER_MS=500
# =============================================================================
# LLM / provider keys
# =============================================================================
# Phase 1: provider enum extended from 3 to 6 values.
# Valid values: xai | openai | anthropic | lfm25-local | openrouter-lfm25 | openrouter-llama-1b
LLM_PROVIDER=xai
# Same enum extension. Empty = no fallback.
# LLM_FALLBACK_PROVIDER=
XAI_API_KEY=
XAI_BASE_URL=https://api.x.ai/v1
XAI_MODEL_PRIMARY=grok-3
XAI_MODEL_FALLBACKS=grok-3-mini
# Optional alternative provider credentials.
# OPENAI_API_KEY=
# OPENAI_MODEL=gpt-4o-mini
# OPENAI_BASE_URL=https://api.openai.com/v1
# ANTHROPIC_API_KEY=
# ANTHROPIC_MODEL=claude-3-5-sonnet-latest
# ANTHROPIC_BASE_URL=https://api.anthropic.com/v1
# Optional runtime tuning.
# LLM_TIMEOUT_MS=30000
# LLM_MAX_TOKENS=350
# LLM_TEMPERATURE=0.7
# LLM_CANNED_FALLBACK=Sorry, gerade keine Antwort moeglich
# =============================================================================
# Phase 1: Pre-LLM tier (intent / sentiment / guard pre-classifier)
# =============================================================================
# Runs BEFORE the rule-based classify() in src/canonical/pipeline.ts.
# Hard-stops on crisis_flag and contains_internal_token; passes
# intent/confidence/tokens/sentiment into the audit log otherwise.
#
# Provider selection (env-var driven, no code change needed to switch):
# lfm25-local → Ollama sidecar (default, primary)
# openrouter-lfm25 → OpenRouter cloud LFM2.5-1.2B (1st fallback)
# openrouter-llama-1b → OpenRouter cloud Llama-3.2-1B (2nd fallback)
# rule-based → no LLM call, synchronous, ~70% accuracy
# xai → auto-demoted to rule-based (cost gate)
# — xAI Grok-3 is too expensive for the per-mention
# call rate; use it only for the main LLM_PROVIDER
# downstream, not for the Pre-LLM step.
# Primary Pre-LLM provider (default: lfm25-local).
PIPELINE_PRE_LLM_PROVIDER=lfm25-local
# Fallback Pre-LLM provider when the primary fails (default: openrouter-llama-1b).
PIPELINE_PRE_LLM_FALLBACK=openrouter-llama-1b
# --- Ollama sidecar (LFM2.5-1.2B local) ---
# LFM25_LOCAL_URL points at the Ollama /api/chat endpoint.
# Local dev: http://localhost:11434
# Render: http://ollama-lfm25:11434 (set automatically by render.yaml)
LFM25_LOCAL_URL=http://localhost:11434
# Ollama model tag (Ollama registry format, not the OpenRouter slug).
# Pre-pulled by Dockerfile.ollama at build time.
LFM25_LOCAL_MODEL=lfm2.5:1.2b-instruct
# --- OpenRouter Free-Tier (cloud fallback) ---
# Required: set in Render dashboard as sync:false secret.
# Empty key = OpenRouter clients are not constructed, falls through to rule-based.
OPENROUTER_API_KEY=
# OpenRouter model slugs (Free-Tier). 20 req/min combined rate limit applies.
# NOTE: meta-llama/llama-3.2-1b-instruct:free may 404 — OpenRouter has been
# retiring the :free suffix on some models. Override here if needed:
# OPENROUTER_LLAMA1B_MODEL=meta-llama/llama-3.2-1b-instruct
OPENROUTER_LFM25_MODEL=liquid/lfm-2.5-1.2b-instruct:free
OPENROUTER_LLAMA1B_MODEL=meta-llama/llama-3.2-1b-instruct:free
# Required by OpenRouter for app attribution (HTTP-Referer / X-Title headers).
OPENROUTER_REFERER=https://organoid-symbionts.app
OPENROUTER_TITLE=organoid_Symbionts
# --- Ollama sidecar service config (render.yaml ollama-lfm25 worker only) ---
# OLLAMA_KEEP_ALIVE=24h — keep model in RAM 24h (avoid cold-start eviction)
# OLLAMA_HOST=0.0.0.0:11434 — bind to all interfaces
# These live on the ollama-lfm25 worker service, NOT on the embodiments-worker.
# --- Phase 1 Rollback (env-only, no code deploy) ---
# To disable the LLM-based pre-classifier without redeploying code:
# PIPELINE_PRE_LLM_PROVIDER=rule-based
# PIPELINE_PRE_LLM_FALLBACK=rule-based
# The pipeline keeps running; pre-LLM step uses the synchronous rule-based
# classifier. Lower intent-classification accuracy (~70%) but no LLM calls,
# no cold-start, no rate limits. Reasoning pipeline still runs normally.
# =============================================================================
# Safety / engagement / feature flags
# =============================================================================
# Optional compliance gate for proactive engagement.
# ENGAGEMENT_AI_APPROVED=false
# ENGAGEMENT_OPT_IN_HANDLES=
# ENGAGEMENT_OPT_OUT_HANDLES=
# Only for the proactive timeline loop.
# TIMELINE_ENGAGEMENT_ENABLED=false
# TIMELINE_ENGAGEMENT_INTERVAL_MS=600000
# TIMELINE_ENGAGEMENT_MAX_PER_RUN=2
# TIMELINE_ENGAGEMENT_MAX_PER_HOUR=3
# TIMELINE_ENGAGEMENT_MAX_PER_DAY=12
# TIMELINE_MIN_CONTEXT_SCORE=55
# TIMELINE_MIN_FINAL_SCORE=60
# TIMELINE_REQUIRE_THREAD_STRUCTURE=false
# TIMELINE_SOURCE_ACCOUNTS=
# TIMELINE_KEYWORD_FILTERS=
# TIMELINE_AUTHOR_COOLDOWN_MINUTES=180
# TIMELINE_CONVERSATION_COOLDOWN_MINUTES=120
# =============================================================================
# Orchestration / embodiments / hybrid runtime
# =============================================================================
# EMBODIMENTS_ENABLED=true
# DEFAULT_SAFE_EMBODIMENT=stillhalter
# EMBODIMENT_ROUTING_DEBUG=false
# Conservative base; render.yaml keeps orchestration off explicitly.
# EMBODIMENT_ORCHESTRATION_ENABLED=false
# EMBODIMENT_CONTINUITY_ENABLED=true
# EMBODIMENT_SWARM_ENABLED=false
# EMBODIMENT_MAX_CAMEOS=2
# Optional embodiment feature flags that stay false unless explicitly enabled.
# EMBODIMENT_MEMORY_ENABLED=false
# EMBODIMENT_EVOLUTION_ENABLED=false
# EMBODIMENT_RUNNING_JOKES_ENABLED=false
# EMBODIMENT_TRAIT_DRIFT_LIMIT=0.25
# EMBODIMENT_ENSEMBLE_ENABLED=false
# EMBODIMENT_AUTONOMY_ENABLED=false
# EMBODIMENT_ARC_ENGINE_ENABLED=false
# EMBODIMENT_WORLD_ENABLED=false
# EMBODIMENT_WORLD_EVENTS_ENABLED=false
# EMBODIMENT_FACTIONS_ENABLED=false
# EMBODIMENT_RITUALS_ENABLED=false
# EMBODIMENT_LORE_EXPANSION_ENABLED=false
# Optional governance ceilings for world/ritual overlays.
# EMBODIMENT_MAX_ACTIVE_WORLD_EVENTS=2
# EMBODIMENT_MAX_ACTIVE_RITUAL_OVERLAYS=1
# HYBRID_RUNTIME_MODE=hybrid
# HYBRID_MEMORY_STORE_PATH=
# HYBRID_MEMORY_FILE_PATH=
# HYBRID_RUNTIME_MIN_MATCH_SCORE=0.7
# HYBRID_RUNTIME_MAX_DIFF_COUNT=4
# HYBRID_RUNTIME_ALLOW_SHADOW_ONLY=false
# HYBRID_RUNTIME_MAX_ATOMS=5
# HYBRID_RUNTIME_MAX_EPISODES=5
# HYBRID_RUNTIME_MAX_NOTES=4
# HYBRID_RUNTIME_MAX_LOOPS=4
# HYBRID_RUNTIME_MAX_REASONS=4
# HYBRID_RUNTIME_MAX_CONTEXT_CHARS=720
# =============================================================================
# Identity / Solana
# =============================================================================
# BOT_TOKEN_MINT=So11111111111111111111111111111111111111112
# BOT_TREASURY_WALLET=
# BOT_TICKER=Organoid
# BOT_PROGRAM_ID=
# SOLANA_RPC_PRIMARY_URL=https://api.mainnet-beta.solana.com
# SOLANA_RPC_FALLBACK_URL=https://solana-api.projectserum.com
# =============================================================================
# Observability / pulse heart
# =============================================================================
# Optional console/terminal tap controls for pulse-heart telemetry.
# ORGANOID_PULSE_HEART_TERMINAL=true
# ORGANOID_PULSE_HEART_CONSOLE_TAP=false